Find the Fourier series of $f(x) = \frac{a_0}{2} + \sum_{k = 1}^{n}(a_k\cos{kx} + b_k\sin{kx})$ I'm learning about Fourier series and need help with this problem:

Find the Fourier series of
  $$
f(x) = \frac{a_0}{2} + \sum_{k = 1}^{n}(a_k\cos{kx} + b_k\sin{kx})
$$


My thoughts:
The above trigonometric polynomial is the nth partial sum of the Fourier series for $f$. Taking the sum to infinity we get the Fourier series of $f$. Is it that simple or am I missing something here? 
 A: By the orthogonality of trigonometric functions I meant the following identities
$$
\begin{align}
\int _{-\pi }^{\pi }\sin (nx)\sin (mx)\mathrm{d}x&=\pi \delta _{m,n}\\
\int _{-\pi }^{\pi }\cos (nx)\cos (mx)\mathrm{d}x&=\pi \delta _{m,n}\\
\int _{-\pi }^{\pi }\sin (nx)\cos (mx)\mathrm{d}x&=0
\end{align}
$$
which can be easily verified by using basic trigonometric identities, such as product-to-sum formulas. Let 
$$f(x)=\frac{c_0}{2}+\sum _{m=1}^{+\infty }(c_m\cos (mx)+d_m\sin (mx))$$
be the Fourier series of $f$. Then the coefficients for your $f(x)$ satisfy
$$
\begin{align}
c_m&=\frac{1}{\pi }\int _{-\pi }^{\pi }f(x)\cos (mx)\mathrm{d}x\\
&=\frac{1}{\pi}\sum _{k=1}^{n }\left(a_k\int _{-\pi }^{\pi }\cos (kx)\cos (mx)\mathrm{d}x+b_k\int _{-\pi }^{\pi }\sin (kx)\cos (mx)\mathrm{d}x\right)\\
&=\frac{1}{\pi}\sum _{k=1}^{n }\left(a_k \cdot \pi \delta _{k,m}+b_k\cdot 0\right)=a_m \text{ for $m\leq n$ and 0 otherwise}
\end{align}$$
The same goes for $c_0=a_0$ and $d_m=b_m$ and this proves explicitly that the Fourier series of $f(x)$ is $f(x)$. The $\delta $ symbol is the Kronecker delta.
