0% found this document useful (0 votes)
20 views2 pages

Equations PDF

The document provides examples of how to write different types of equations in LaTeX, including: 1) Simple numbered and unnumbered equations, differential equations, and partial differential equations. 2) Adding text to equations and writing equations over two lines. 3) Writing matrices and systems of equations with braces.

Uploaded by

Siddhanta Roy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

Equations PDF

The document provides examples of how to write different types of equations in LaTeX, including: 1) Simple numbered and unnumbered equations, differential equations, and partial differential equations. 2) Adding text to equations and writing equations over two lines. 3) Writing matrices and systems of equations with braces.

Uploaded by

Siddhanta Roy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Some Examples of Equation-Writing in LATEX

Doreen De Leon
Department of Mathematics, UCLA
January 9, 2012

Writing a Simple Equation

To display an unnumbered equation on a new line, just type: \[ x = 2x - 3. \].


This will display as:
x0 = 2x 3.
If we want to get a numbered equation, we must type:
\begin{equation}
x = 2x - 3.
\end\{equation}
This will display as:
x0 = 2x 3.

(1)

Now, suppose we want to write a differential equation in another form. Try


\[ \frac{dy}{dt} = 2y + 8.\]. This displays as:
dy
= 2y + 8.
dt
or, we may write $$ y_t = 2y + 8.$$:
yt = 2y + 8.
Now, suppose we have a partial differential equation. To write it with the
partial derivatives, we just do:
$$\frac{\partial^2 u\}{\partial^2 x} + \frac{\partial^2 u}{\partial^2 y} = 0.$$
This displays as:
2u 2u
+
= 0.
2x 2y
Or, we may write \[ u_{xx} + u_{yy} = 0.\], which displays as:
uxx + uyy = 0.

To add text to an equation do, for example:


\[ y=mx+b, \$text{ where $m$ is the slope, } x \in (-\infty, \infty). \].
This displays as:
y = mx + b, where m is the slope, x (, ).
Note: You need to have included the amstext package at the beginning of the
document (after the \documentclass command.)
If we want to write an equation with a two-line right-hand-side,

1 if x 0,
y(0) =
(2)
1 if x > 0.
To write several equations together, we do the following:

ut + ux

u(x, 0)

0


1
1

if x 0,
if x > 0.

(3)

More complicated expressions

Here is one way we would


write a matrix(using the array command and speci
a11 a12 . . . a1n
a21 a22 . . . a2n

fying spacing): A = .
..
..
.
.
.
.
an1 an2 . . . ann
Alternately, we may use the pmatrix command, which we can use if we add
\usepackage{amsmath} to the preamble.
To write a system of equations with a left brace, we may do the following:
0
x = 3x 2y + 3xy,

0
y = 2x 3y 2xy,
(1)
x(0) = 0,

y(0) = 1

You might also like