Given the function, $ f(x) = 3\sin(2x)+2\cos(5x) $, with the period $2\pi$.
Find the Fourier coefficients using,
$a_0 = \frac{1}{\pi} \int_{0}^{2\pi}f(x) dx$
$a_n = \frac{1}{\pi} \int_{0}^{2\pi}f(x)\cos(nx) dx$
$b_n = \frac{1}{\pi} \int_{0}^{2\pi}f(x)\sin(nx) dx$
where $n$ is a natural number. Which coefficients are nonzero and what frequency do they correspond to?
Should I just calculate the integral? Is there something that I have to keep in mind? New to this area!
In this case, you can read the coefficients right off of the expression for $f(x).$
We know that $\{1, \cos k x, \sin k x\}_{k=1,2,\cdots}$ are orthogonal, so, for example, $$ \int_0^{2\pi} \cos j x \cos k x \, dx = 0 \text{ when } j\ne k,$$
so
$$ a_n = \left\{ \begin{array}{cc} 2, & n=5\\ 0, & \text{otherwise}\end{array} \right.$$
$$ b_n = \left\{ \begin{array}{cc} 3, & n=2\\ 0, & \text{otherwise}\end{array} \right.$$
To elaborate ...
$$\begin{aligned} a_0 &= \frac{1}{\pi} \int_0^{2\pi} f(x) \, dx= \frac{1}{\pi}\int_0^{2\pi} ( 3 \sin 2 x + 2 \cos 5 x) \, dx = 0\\ a_1 &= \frac{1}{\pi} \int_0^{2\pi} f(x)\cos x \,dx = \frac{1}{\pi}\int_0^{2\pi} ( 3 \sin 2 x + 2 \cos 5 x)\cos x \, dx = 0\\ &\vdots\\ a_4 &= \frac{1}{\pi} \int_0^{2\pi} f(x)\cos 4 x \,dx = \frac{1}{\pi}\int_0^{2\pi} ( 3 \sin 2 x + 2 \cos 5 x)\cos 4 x \, dx = 0\\ a_5 &= \frac{1}{\pi} \int_0^{2\pi} f(x)\cos 5 x \,dx = \frac{1}{\pi}\int_0^{2\pi} ( 3 \sin 2 x + 2 \cos 5 x)\cos 5 x \, dx = \frac{2}{\pi} \int_0^{2\pi} \cos^2 5x \, dx= 3\\ a_6 &= \frac{1}{\pi} \int_0^{2\pi} f(x)\cos 6 x \,dx = \frac{1}{\pi}\int_0^{2\pi} ( 3 \sin 2 x + 2 \cos 5 x)\cos 6 x \, dx = 0\\ &\vdots\\ \end{aligned}$$
$$\begin{aligned} b_1 &= \frac{1}{\pi} \int_0^{2\pi} f(x)\sin x \,dx = \frac{1}{\pi}\int_0^{2\pi} ( 3 \sin 2 x + 2 \cos 5 x)\sin x \, dx = 0\\ b_2 &= \frac{1}{\pi} \int_0^{2\pi} f(x)\sin 2 x \,dx = \frac{1}{\pi}\int_0^{2\pi} ( 3 \sin 2 x + 2 \cos 5 x)\sin 2 x \, dx = \frac{3}{\pi} \int_0^{2\pi} \sin^2 2x \, dx= 3\\ b_3 &= \frac{1}{\pi} \int_0^{2\pi} f(x)\sin 3 x \,dx = \frac{1}{\pi}\int_0^{2\pi} ( 3 \sin 2 x + 2 \cos 5 x)\sin 3 x \, dx = 0\\ &\vdots\\ \end{aligned}$$