## LaTeX forum ⇒ Text Formatting ⇒ Equation on multiple lines Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
minidiable
Posts: 30
Joined: Tue Nov 13, 2012 4:18 pm

### Equation on multiple lines

Hi to everyone, I am writing a journal article for the IOP Smart Materials and Structures.

I wrote this equation:

\begin{equation}\begin{multlined}\frac{dW}{d\lambda} = \sigma_{1}-\sigma_{2}\nonumber  = nk\Theta\times\Biggl(\frac{1}{2}\left(2\lambda-\frac{2}{\lambda^{3}}\right)\\+\frac{519\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{4}}{134750N^{4}}\\+\frac{19\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{3}}{1750N^{3}}\\+\frac{11\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{2}}{350N^{2}}\\+\frac{\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)}{10N}\Biggr)\end{multlined}

Which results in the pic attached.

I don´t like it a lot and I would like to know what could I do to have a better equation displaying there.

Attachments eqLatex.png (39.99 KiB) Viewed 8749 times

Tags:

Johannes_B
Site Moderator
Posts: 4077
Joined: Thu Nov 01, 2012 4:08 pm
Not sure what you are looking for, maybe this:
\documentclass{article}\usepackage{mathtools}\begin{document}%    \begin{equation}%    \begin{multlined}\begin{align*}     \frac{dW}{d\lambda} = \sigma_{1}-\sigma_{2}\nonumber      =      nk\Theta\times\Biggl(&\frac{1}{2}\left(2\lambda-\frac{2}{\lambda^{3}}\right)     \\     &+\frac{519\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{4}}{134750N^{4}}     \\     &+\frac{19\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{3}}{1750N^{3}}     \\     &+\frac{11\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{2}}{350N^{2}}     \\     &+\frac{\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)}{10N}\Biggr)     \end{align*}%    \end{multlined}%    \end{equation}\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

minidiable
Posts: 30
Joined: Tue Nov 13, 2012 4:18 pm
Like that it is nice but I can´t put anymore a label to the equation because it is just an :

\begin{align*}
...
\end{align*}

How can I put a label to this equation and how can I put a number of equation? If I remove the "*" I have numbers at every line.

Thanks for the help,
Fab.

esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm
Use an aligned environment inside equation :
\documentclass{article}\usepackage{mathtools}\begin{document}\begin{equation}\label{eq:longeq}     \begin{aligned}[b]% the number will be at b(ottom)     \frac{dW}{d\lambda} = \sigma_{1}-\sigma_{2}%\nonumber      =      nk\Theta\times\Biggl(&\frac{1}{2}\left(2\lambda-\frac{2}{\lambda^{3}}\right)     \\     &+\frac{519\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{4}}{134750N^{4}}     \\     &+\frac{19\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{3}}{1750N^{3}}     \\     &+\frac{11\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{2}}{350N^{2}}     \\     &+\frac{\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)}{10N}\Biggr)     \end{aligned}\end{equation}See equation \eqref{eq:longeq}\end{document} equation.png (12.03 KiB) Viewed 8718 times

Best regards
Elke

minidiable
Posts: 30
Joined: Tue Nov 13, 2012 4:18 pm
Thanks for the reply but to me it is not working. \begin{equation}\label{eq:stressStrain}\begin{aligned}[b]     \frac{dW}{d\lambda} = \sigma_{1}-\sigma_{2}\nonumber      =      nk\Theta\times\Biggl(&\frac{1}{2}\left(2\lambda-\frac{2}{\lambda^{3}}\right)     \\     &+\frac{519\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{4}}{134750N^{4}}     \\     &+\frac{19\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{3}}{1750N^{3}}     \\     &+\frac{11\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{2}}{350N^{2}}     \\     &+\frac{\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)}{10N}\Biggr)     \end{aligned}\end{equation}

What do I do wrong?
Attachments equationLong.png (69.7 KiB) Viewed 8633 times

esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm
There is an active \nonumber in the first line of the aligned environment. Delete this command to get an equation number.

Best regards
Elke

minidiable
Posts: 30
Joined: Tue Nov 13, 2012 4:18 pm