I currently have this ugly equation:
The green alignment is just like I want it. The Red one is what I would like to get, but I don't know how.
Here is my MWE:
\documentclass[a4paper]{scrartcl}
\usepackage{amssymb, amsmath} % needed for math
\usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
\begin{document}
\begin{align}
f_1(x) &= a \left (x - \frac{b}{3a} \right )^3 + b \left (x-\frac{b}{3a} \right )^2 + c \left (x-\frac{b}{3a} \right ) + d\\
&= a \left (x^3 - 3 \frac{b}{3a}x^2 + 3 (\frac{b}{3a})^2 x - \frac{b^3}{27a^3} \right )
+b \left (x^2 - \frac{2b}{3a} x + \frac{b^2}{9a^2} \right )
+c x - \frac{bc}{3a} + d\\
&= ax^3 - bx^2 + \frac{b^2}{3a}x - \frac{b^3}{27 a^2}\\
& \;\;\;\;\;\;+ bx^2 - \frac{2b^2}{3a}x + \frac{b^3}{9a^2}\\
& \;\;\;\;\;\;\;\;\;\;\;\; + c x - \frac{bc}{3a} + d\\
&= ax^3 + \frac{b^2}{3a}\left (1-2+c \right )x + \frac{b^3}{9a^2} \left (1-\frac{1}{3} \right )- \frac{bc}{3a} + d
\end{align}
\end{document}
Best Answer
Just add suitable phantoms: