Here's what I'm trying to achieve:
Here's my MWE:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\displaystyle\int_{-a}^{+a}f(x)e^{-i\frac{n\pi x}{a}}\; dx = \sum_{n=-\infty}^{+\infty}c_n\int_{-a}^{+a}e^{i(n-m)\frac{\pi x}{a}}\; dx = \\
\text{for } n \neq m: \quad \int_{-a}^{+a}e^{-i\frac{n\pi x}{a}}\; dx
\begin{split}
&= \left[\frac{e^{i(n-m)\frac{\pi x}{a}}}{i(n-m)\frac{\pi}{a}}\right]^{+a}_{-a} = \frac{e^{i(n-m)\pi}-e^{-i(n-m)\pi}}{i(n-m)\frac{\pi}{a}}\\
&=\frac{(-1)^{n-m}-(-1)^{n-m}}{i(n-m)\frac{\pi}{a}} = 0
\end{split}\\
\text{for } n = m: \quad \int_{-a}^{+a}e^{-i\frac{n\pi x}{a}}\; dx
\end{align*}
\end{document}
\begin{split}
, but\begin{aligned}[t]
. Remove\displaystyle
that doesn nothing at all. The space before the differential should be\,
and not\;
.