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

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

 x = \frac{y}{z}

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:

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

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:

 \cos (2\theta) = \cos^2 \theta - \sin^2 \theta \int \cos (2\theta) = \int \cos^2 \theta - \int \sin^2 \theta \int_0^\infty \cos x = \int_0^\infty \cos y - \int_0^\infty \sin y

Basic Tutorials: