We use cookies on this site. By browsing our site you agree to our use of cookies. Close this message Find out more

Home > Physics > Computer Skills > LateX > Basic Equations
More in this section LateX

Basic Equations

Entering equations in LateX is very similar to other programming languages, with a few distinct differences which will become obvious shortly.

Let's begin with the code for a very simple equation x = y/z


\begin{equation}
x = \frac{y}{z}
\end{equation}

 equation1

 

This code is very simple, the only thing to bear in mind is to make sure you have the appropriate begin and end tags. Let's move onto something a bit more complicated:


\begin{equation}
\overline{x} = \frac{\sum_0^M x_i p_i}{\sum_0^M p_i}
\end{equation}

                                                                                       equation2

The notation here is different to what you are probably used to. To set the limits on a sum or integral you must use the "^" character as shown above. However, when using subscripts or superscripts the normal conditions apply... use "_" for subscripts and "^" for superscripts.

More useful equations and code to go with them:

\begin{equation}
\cos (2\theta) = \cos^2 \theta - \sin^2 \theta
\end{equation}

 equation3
\begin{equation}
\int \cos (2\theta) = \int \cos^2 \theta - \int \sin^2 \theta
\end{equation}
 equation4
\begin{equation}
\int_0^\infty \cos x = \int_0^\infty \cos y - \int_0^\infty \sin y
\end{equation}
 equation5


 
 
 
 

Comment on this page

Did you find the information you were looking for? Is there a broken link or content that needs updating? Let us know so we can improve the page.

Note: If you need further information or have a question that cannot be satisfied by this page, please call our switchboard on +44 (0)1784 434455.

This window will close when you submit your comment.

Add Your Feedback
Close