1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Latex problem (simple)

  1. Dec 13, 2012 #1
    Whenever I write equations in an align they end up very messed up. I have attached picture of how they look. How do I get the equations to start at the left and not suddenly to the right?
    My align enviroment says:
    \langle x^2 \rangle = \int_{-\infty}^{\infty}e^{-\mid \alpha_{0}\mid^{2}}\sum_{n=0}^{\infty}\frac{(\alpha_{0}e^{i\omega t})^n}{\sqrt{n!}}\psi_{n}(x)\frac{\hbar}{2m\omega}(a_{+}+a_{-})^2\sum_{m=0}^{\infty}\frac{(\alpha_{0}e^{-i\omega t})^m}{\sqrt{m!}}\psi_{m}(x)dx \\
    = \frac{\hbar}{2m\omega}e^{-\mid \alpha_{0}\mid^{2}}\int_{-\infty}^{\infty}\sum_{n=0}^{\infty}\frac{(\alpha_{0}e^{i\omega t})^n}{\sqrt{n!}}\psi_{n}(x)(a_{+}^2+a_{-}^2+a_{+}a_{-}+a_{-}a_{+})\sum_{m=0}^{\infty}\frac{(\alpha_{0}e^{-i\omega t})^m}{\sqrt{m!}}\psi_{m}(x)dx\\ = \frac{\hbar}{2m\omega}e^{-\mid \alpha_{0}\mid^{2}}\int_{-\infty}^{\infty}\sum_{n=0}^{\infty}[a_{+}^2\frac{(\alpha_{0}e^{-i\omega t})^n}{\sqrt{n!}}\psi_{n}(x)]^{*}[(a_{+}^2+n+n+1)\sum_{m=0}^{\infty}\frac{(\alpha_{0}e^{-i\omega t})^m}{\sqrt{m!}}\psi_{m}(x)]dx\\
    =\frac{\hbar}{2m\omega}e^{-\mid \alpha_{0}\mid^{2}}\int_{-\infty}^{\infty}\sum_{n=0}^{\infty}[\frac{\sqrt{n+1}\sqrt{n+2}(\alpha_{0}e^{-i\omega t})^n}{\sqrt{n!}}\psi_{n+2}(x)]^{*}[\sum_{m=0}^{\infty})(2n+1)\frac{(\alpha_{0}e^{-i\omega t})^m}{\sqrt{m!}}\psi_{m}(x)+\sum_{m=0}^{\infty}\sqrt{n+1}\sqrt{n+2}\frac{(\alpha_{0}e^{-i\omega t})^m}{\sqrt{m!}}\psi_{m+2}(x)]dx]\\ =
    Seems messy, but all I want you to is identify what is making the equations start all the way at the left and go out of the margin.

    Attached Files:

  2. jcsd
  3. Dec 14, 2012 #2


    Staff: Mentor

    I'm only moderately knowledgeable about LaTeX, especially the alignment bits. It seems that when you use align or align*, you need to indicate where you want the alignment to occur. To align at the =, use & in front of =.

    I have done that below, and it renders more closely like what you want.
    Last edited: Dec 14, 2012
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook