Math & Scienceanother problem with lining up the equation

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
rayman
Posts: 24
Joined: Thu Feb 24, 2011 11:53 am

another problem with lining up the equation

Post by rayman »

Hello! I have been trying to set up this equation in many ways but it does not look very nice...Can we move these 4 rows a bit to the left so they are more less in the center? It would be great to move them so they all lie under the second integral in the first row. Can someone smart help me? ;)
Attachments
integral.jpg
integral.jpg (26.25 KiB) Viewed 3225 times
Last edited by rayman on Mon May 16, 2011 10:28 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: another problem with lining up the equation

Post by Stefan Kottwitz »

Put the & before the = in the first row, and before the alignment place in the other rows. Perhaps post your code for that equations here, for seeing how you did it and for fixing.

Stefan
LaTeX.org admin
rayman
Posts: 24
Joined: Thu Feb 24, 2011 11:53 am

another problem with lining up the equation

Post by rayman »

Stefan_K wrote:Put the & before the = in the first row, and before the alignment place in the other rows. Perhaps post your code for that equations here, for seeing how you did it and for fixing.

Stefan

Oh yes, I totally forgot here is my latex code

Code: Select all

\int\limits_{S}f=\int\limits_{S}\frac{1}{2}f_{\mu\nu}(x(u))J^{\mu\nu}(x(u))du^{1}\wedge du^{2}\\
               &=\int\limits_{S}\frac{E}{4\pi}\frac{Rsin\theta cos\phi}{R^3}J^{yz}(\theta,\phi)d\theta\wedge d\phi+\\
               &+\int\limits_{S}\frac{E}{4\pi}\frac{Rsin\theta sin\phi}{R^3}J^{zx}(\theta,\phi)d\theta\wedge d\phi\\
               &+\int\limits_{S}\frac{E}{4\pi}\frac{Rcos\theta}{R^3}J^{xy}(\theta,\phi)d\theta\wedge d\phi\\
               &=\frac{E}{4\pi}\int_{0}^{2\pi}d\theta\int_{0}^{\pi}d\theta sin\theta=-\frac{E}{2}cos\theta|_{0}^{\pi}\\
               &=E
P.S Why latex does not work here?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

another problem with lining up the equation

Post by Stefan Kottwitz »

rayman wrote:P.S Why latex does not work here?
Just use code instead of latex, I edited it. I'll have a look.

Stefan
LaTeX.org admin
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

another problem with lining up the equation

Post by Stefan Kottwitz »

As I guessed, there's just a & missing before the equal sign in the first row. Further I recommend to use operator names such as \sin and \cos:

Code: Select all

\begin{align*}
\int\limits_{S}f&=\int\limits_{S}\frac{1}{2}f_{\mu\nu}(x(u))J^{\mu\nu}(x(u))du^{1}\wedge du^{2}\\
               &=\int\limits_{S}\frac{E}{4\pi}\frac{R\sin\theta\cos\phi}{R^3}J^{yz}(\theta,\phi)d\theta\wedge d\phi\\
               &\quad+\int\limits_{S}\frac{E}{4\pi}\frac{R\sin\theta\sin\phi}{R^3}J^{zx}(\theta,\phi)d\theta\wedge d\phi\\
               &\quad+\int\limits_{S}\frac{E}{4\pi}\frac{R\cos\theta}{R^3}J^{xy}(\theta,\phi)d\theta\wedge d\phi\\
               &=\frac{E}{4\pi}\int_{0}^{2\pi}d\theta\int_{0}^{\pi}d\theta\sin\theta=-\frac{E}{2}\cos\theta|_{0}^{\pi}\\
               &=E
\end{align*}
align.png
align.png (11.47 KiB) Viewed 3221 times
Stefan
LaTeX.org admin
rayman
Posts: 24
Joined: Thu Feb 24, 2011 11:53 am

Re: another problem with lining up the equation

Post by rayman »

looks really nice! Many thanks!
Post Reply