P_n(x+1) &=\lim_{\epsilon\to 0} \frac{1}{2^2 n!}~\frac{d^n}{d\epsilon^n}[\epsilon^n(2+\epsilon)^n]\\
&=\lim_{\epsilon \to 0} \frac{1}{2^2 n!}~\frac{d^n}{d\epsilon^n} [ 2^n\epsilon^n +\underbrace{\text{higher order terms in \epsilon}}_{0(\epsilon^{n+1})} ]\\
&=\lim_{\epsilon\to 0} \frac{1}{2^2 n!}~2n~\frac{d^n\epsilon^n}{d\epsilon^n} + \underbrace{\frac{d^n 0}{d\epsilon^n}(\epsilon^{n+1})...}_{\text{vanishes as} \epsilon \to 0}

I keep getting:

! Missing $ inserted. $ l.166 \end{align*}

I don't know where to put $. I thought I didn't need one because align* is already in math mode? I had a similar block earlier in the document where I put:

\frac{d^{2n}}{dx^{2n}} (x^2-1)^n &= \frac{d^{2n}}{dx^{2n}}(x^{2n}+\text{lower order terms which vanish under 2n differentiation})\\
&=(2n)! + 0\\
\therefore\int_{-1}^1 P_n(x)P_n(x)dx &= \frac{(2n)!(-1)^n}{(2^n n!)^2}\int_{-1}^1 (1-x^2)^n dx

and it came out fine.


The \epsilon in the underbrace needs to be in math mode:



\newcommand*\diff[3][]{\frac{\differential^{#1} #2}{\differential #3}}


  P_{n}(x + 1)
  &= \lim_{\epsilon \to 0} \frac{1}{2^{2}n!}\diff[n]{}{\epsilon^{n}}{[\epsilon^{n}(2 + \epsilon)^{n}]}\\
  &= \lim_{\epsilon \to 0} \frac{1}{2^{2}n!}\diff[n]{}{\epsilon^{n}}{[2^{n}\epsilon^{n} + \underbrace{\text{higher order terms in $\epsilon$}}_{o(\epsilon^{n + 1})}]}\\
  &= \lim_{\epsilon \to 0} \frac{1}{2^{2}n!}2n\diff[n]{\epsilon^{n}}{\epsilon^{n}} + \underbrace{\diff[n]{o(\epsilon^{n + 1})}{\epsilon^{n}}}_{\substack{\text{vanishes as}\\ \epsilon \to 0}}



Notice the code improvements. (Some of them do to Mico's comment below.)

  • Oh wow. O.O Wait how come it tells me that the error is at the last line but not where it actually occurs? – Dr. A Dec 23 '13 at 3:48
  • @user42999 It just means that it is somewhere in the align* environment. – Svend Tveskæg Dec 23 '13 at 3:50
  • 1
    I would write o ("little oh") rather than 0 to denote a "term of smaller (asymptotic) order". In the final line, you may also want to place the term (\epsilon^{n+1}) in the "numerator" of the derivative expression since it belongs logically to o (or 0). Finally, the \dots may not be necessary. – Mico Dec 23 '13 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.