0

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?

3
  • If you used align and the equations aren't aligning, you have improperly placed the alignment character & or haven't placed it at all.
    – dustin
    Dec 2, 2014 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, 2014 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.
    – dustin
    Dec 2, 2014 at 14:53

2 Answers 2

1

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*}
1

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

\begin{equation}

\end{equation}

2
  • 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.
    – dustin
    Dec 2, 2014 at 1:54
  • 1
    Or use the command \notag
    – 1010011010
    Jun 10, 2015 at 13:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .