0% found this document useful (0 votes)
31 views

Some Examples of Equation-Writing in L TEX

This document provides examples of how to write various types of equations in LaTeX. It demonstrates how to write simple single-line equations, multi-line equations, systems of equations, partial differential equations, equations with text, and matrices. For numbered equations, the begin{equation} and end{equation} commands are used. Various LaTeX packages like amsmath can be included to write matrices and other mathematical expressions. Overall, the document serves as a reference for writing different kinds of mathematical equations in LaTeX.

Uploaded by

rash_vlsi
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)
31 views

Some Examples of Equation-Writing in L TEX

This document provides examples of how to write various types of equations in LaTeX. It demonstrates how to write simple single-line equations, multi-line equations, systems of equations, partial differential equations, equations with text, and matrices. For numbered equations, the begin{equation} and end{equation} commands are used. Various LaTeX packages like amsmath can be included to write matrices and other mathematical expressions. Overall, the document serves as a reference for writing different kinds of mathematical equations in LaTeX.

Uploaded by

rash_vlsi
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 L

A
T
E
X
Doreen De Leon
Department of Mathematics, UCLA
January 9, 2012
1 Writing a Simple Equation
To display an unnumbered equation on a new line, just type: \[ x = 2x - 3. \].
This will display as:
x

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

= 2x 3. (1)
Now, suppose we want to write a dierential equation in another form. Try
\[ \frac{dy}{dt} = 2y + 8.\]. This displays as:
dy
dt
= 2y + 8.
or, we may write $$ y_t = 2y + 8.$$:
y
t
= 2y + 8.
Now, suppose we have a partial dierential 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:

2
u

2
x
+

2
u

2
y
= 0.
Or, we may write \[ u_{xx} + u_{yy} = 0.\], which displays as:
u
xx
+ u
yy
= 0.
1
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,
y(0) =
_
1 if x 0,
1 if x > 0.
(2)
To write several equations together, we do the following:
u
t
+ u
x
= 0
u(x, 0) =
_
1 if x 0,
1 if x > 0.
(3)
2 More complicated expressions
Here is one way we would write a matrix (using the array command and speci-
fying spacing): A =
_
_
_
_
_
a
11
a
12
. . . a
1n
a
21
a
22
. . . a
2n
.
.
.
.
.
.
.
.
.
a
n1
a
n2
. . . a
nn
_
_
_
_
_
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:
_

_
x

= 3x 2y + 3xy,
y

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

You might also like