LaTeX forum ⇒ Text FormattingEquation 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

Postby minidiable » Wed Jul 09, 2014 1:09 pm

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

I wrote this equation:

  1. \begin{equation}
  2. \begin{multlined}
  3. \frac{dW}{d\lambda} = \sigma_{1}-\sigma_{2}\nonumber
  4. = nk\Theta\times\Biggl(\frac{1}{2}\left(2\lambda-\frac{2}{\lambda^{3}}\right)
  5. \\
  6. +\frac{519\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{4}}{134750N^{4}}
  7. \\
  8. +\frac{19\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{3}}{1750N^{3}}
  9. \\
  10. +\frac{11\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{2}}{350N^{2}}
  11. \\
  12. +\frac{\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)}{10N}\Biggr)
  13. \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.

Thanks for your help.
Attachments
eqLatex.png
eqLatex.png (39.99 KiB) Viewed 8749 times

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 4077
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Thu Jul 10, 2014 10:18 pm

Not sure what you are looking for, maybe this:
  1. \documentclass{article}
  2. \usepackage{mathtools}
  3. \begin{document}
  4. % \begin{equation}
  5. % \begin{multlined}
  6. \begin{align*}
  7. \frac{dW}{d\lambda} = \sigma_{1}-\sigma_{2}\nonumber
  8. =
  9. nk\Theta\times\Biggl(&\frac{1}{2}\left(2\lambda-\frac{2}{\lambda^{3}}\right)
  10. \\
  11. &+\frac{519\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{4}}{134750N^{4}}
  12. \\
  13. &+\frac{19\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{3}}{1750N^{3}}
  14. \\
  15. &+\frac{11\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{2}}{350N^{2}}
  16. \\
  17. &+\frac{\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)}{10N}\Biggr)
  18. \end{align*}
  19. % \end{multlined}
  20. % \end{equation}
  21. \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

Postby minidiable » Fri Jul 11, 2014 3:55 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

Postby esdd » Fri Jul 11, 2014 4:33 pm

Use an aligned environment inside equation :
  1. \documentclass{article}
  2. \usepackage{mathtools}
  3. \begin{document}
  4. \begin{equation}\label{eq:longeq}
  5. \begin{aligned}[b]% the number will be at b(ottom)
  6. \frac{dW}{d\lambda} = \sigma_{1}-\sigma_{2}%\nonumber
  7. =
  8. nk\Theta\times\Biggl(&\frac{1}{2}\left(2\lambda-\frac{2}{\lambda^{3}}\right)
  9. \\
  10. &+\frac{519\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{4}}{134750N^{4}}
  11. \\
  12. &+\frac{19\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{3}}{1750N^{3}}
  13. \\
  14. &+\frac{11\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{2}}{350N^{2}}
  15. \\
  16. &+\frac{\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)}{10N}\Biggr)
  17. \end{aligned}
  18. \end{equation}
  19. See equation \eqref{eq:longeq}
  20. \end{document}


equation.png
equation.png (12.03 KiB) Viewed 8718 times


Best regards
Elke

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

Postby minidiable » Mon Jul 21, 2014 11:19 am

Thanks for the reply but to me it is not working. :(

  1. \begin{equation}\label{eq:stressStrain}
  2. \begin{aligned}[b]
  3. \frac{dW}{d\lambda} = \sigma_{1}-\sigma_{2}\nonumber
  4. =
  5. nk\Theta\times\Biggl(&\frac{1}{2}\left(2\lambda-\frac{2}{\lambda^{3}}\right)
  6. \\
  7. &+\frac{519\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{4}}{134750N^{4}}
  8. \\
  9. &+\frac{19\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{3}}{1750N^{3}}
  10. \\
  11. &+\frac{11\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)^{2}}{350N^{2}}
  12. \\
  13. &+\frac{\left(2\lambda-\frac{2}{\lambda^{3}}\right)\left(\lambda^{2}+\frac{1}{\lambda^{2}}+1\right)}{10N}\Biggr)
  14. \end{aligned}
  15. \end{equation}




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

esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm

Postby esdd » Mon Jul 21, 2014 12:21 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

Postby minidiable » Mon Jul 21, 2014 12:35 pm

Thanks for your help.


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 3 guests