How do you align a series of equations in the center like Krizalid does in this thread?

http://www.mathhelpforum.com/math-he...opic-sums.html

I tried to duplicate the appropriate LaTeX code but don't seem to be able to. Could someone tell me what I'm doing wrong?

$\displaystyle \begin{aligned}\int{f(x)g(x)}dx&

=f(x)+200g(x)&

=5\end{aligned}$

Code:`\begin{aligned}\int{f(x)g(x)}dx&`

=f(x)+200g(x)&

=5\end{aligned}