Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aligning math equations in Latex

Tags:

latex

amsmath

I am trying to align the following equations around the equal sign. What can I do? Thanks! I am using the AMSMath package

    $$m\ddot{x}_{1}-K(x_{2}+x_{12})+C(\dot{x}_{12}+\dot{x}_{2})+2C\dot{x}_{1} = fx_{1}$$
$$m\ddot{x}_{2}-K(x_{3}+x_{1})+C(\dot{x}_{1}+\dot{x}_{3})+2C\dot{x}_{2} = fx_{2}$$ 
$$m\ddot{x}_{3}-K(x_{4}+x_{2})+C(\dot{x}_{2}+\dot{x}_{4})+2C\dot{x}_{3} = fx_{3}$$ 
like image 718
Adam Lee Avatar asked Nov 13 '09 21:11

Adam Lee


People also ask

How do we align an equation in LaTeX?

The eqnarray environment lets you align equations so that, for example, all of the equals signs "=" line up. To do this, put ampersand "&" signs around the text you want LaTeX to align, e.g. Each equation can be labelled separately, just put the label command after the relevant equation.

What is the package for Align in LaTeX?

The align and align* environments, available through the amsmath package, are used for arranging equations of multiple lines. As with matrices and tables, \\ specifies a line break, and & is used to indicate the point at which the lines should be aligned.

How do you write more than one equation in LaTeX?

@Mr.EU: in that case you should use equation together with aligned , as in \begin{equation} \label{eqn:eqlabel} \begin{aligned}[b] f(x) &= x^2 , \\ g(x) &= \exp( x ) . \end{aligned} \end{equation} .


1 Answers

\begin{align}
    m\ddot{x}_{1}-K(x_{2}+x_{12})+C(\dot{x}_{12}+\dot{x}_{2})+2C\dot{x}_{1} &= fx_{1} \\
    m\ddot{x}_{2}-K(x_{3}+x_{1})+C(\dot{x}_{1}+\dot{x}_{3})+2C\dot{x}_{2} &= fx_{2} \\
    m\ddot{x}_{3}-K(x_{4}+x_{2})+C(\dot{x}_{2}+\dot{x}_{4})+2C\dot{x}_{3} &= fx_{3}
\end{align}

See the user's guide.

like image 140
Jed Avatar answered Oct 04 '22 17:10

Jed