# Alignment of two equations on LaTeX

I'm trying to get two equations aligned via the equals sign, this is my code so far:

\begin{align}
\int_0^1 xJ_v(\lambda x)J_v(\mu x) \mathrm{d}x &= \frac{\mu J_v(\lambda)J^{\prime}_v(\mu) - \lambda J_v (\mu)J^{\prime}_v(\lambda)}{\lambda^2 - \mu^2}
\\[5mm]
\int_0^1 x[J_v(\lambda x)]^2 \mathrm{d}x &= [J_{v+1}(\lambda)]^2 + \left( \frac{\lambda^2 - v^2}{2 \lambda^2} \right)[J_v(\lambda)]^2,
\end{align}


I've tried using & and also \begin{align} but it doesn't seem to work. Any help?

• If you used align and the equations aren't aligning, you have improperly placed the alignment character & or haven't placed it at all. Dec 2 '14 at 1:58
• @dustin -- your edit made the code work. the problem was that the end of the first line was marked with \[5mm] where a double backslash was needed. you edited in the second backslash when you reformatted the code. Dec 2 '14 at 14:13
• @barbarabeeton his post on math.stackexchange was off with that code. I didnt check the mathjx formatting. I just assumed a missing or misplaced & when I commented. Dec 2 '14 at 14:53

Right click on the displayed expression below, select Show Math As, and then select TeX Commands.

\begin{align*}
\int_0^1 xJ_v(\lambda x)J_v(\mu x) \mathrm{d}x &= \frac{\mu J_v(\lambda)J^{\prime}_v(\mu) - \lambda J_v (\mu)J^{\prime}_v(\lambda)}{\lambda^2 - \mu^2}\;,\\\\
\int_0^1 x[J_v(\lambda x)]^2 \mathrm{d}x &= [J_{v+1}(\lambda)]^2 + \left( \frac{\lambda^2 - v^2}{2 \lambda^2} \right)[J_v(\lambda)]^2\;,
\end{align*}


In general to align equations, it goes like:

Document text here.
\begin{align}
\label{eq1} x^2 & = y^2 \\
\label{eq2} x^2 & = y^2 \\
\label{eq3} x^2 & = y^2
\end{align}


If you want the equations to not be numbered, take out the label commands and don't write the * at the end of align. Note that you don't need to use other commands to enter and exit the math environment, such as  or the commands

• Taking out \label doesn't stop numbering in LaTeX. Maybe on MathJax but this is not the case in general. To stop numbering, one would use \begin{align*} variant. Dec 2 '14 at 1:54
• Or use the command \notag Jun 10 '15 at 13:16