3

In amsmath package, the following doesn't get aligned properly. Here is the code.

\begin{alignat*}{2}
& 0 &= \dfrac{1}{4}(2(-1)+1)+C\mathrm{e}^{2(-1)}\\
& \implies 0 &= \dfrac{-1}{4}+C\mathrm{e}^{-2}\\
& \implies \dfrac{1}{4}\mathrm{e}^2 &= C\\
& \implies C &= \dfrac{1}{4}\mathrm{e}^2
\end{alignat*}

How to resolve it?

  • You can also use align. – Werner Jan 24 at 16:08
  • You should understand that 2 alignment points per row require 3 &, not 2. – Bernard Jan 24 at 18:20
3

Do you mean something like this?

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat*}{2}
&& 0 &= \dfrac{1}{4}(2(-1)+1)+C\mathrm{e}^{2(-1)}\\
& \implies& 0 &= \dfrac{-1}{4}+C\mathrm{e}^{-2}\\
& \implies& \dfrac{1}{4}\mathrm{e}^2 &= C\\
& \implies& C &= \dfrac{1}{4}\mathrm{e}^2
\end{alignat*}
\end{document}

enter image description here

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.