If $a_1+a_2\sin x+a_3\cos x+a_4\sin 2x+a_5\cos 2x=0$ is an identity in $x$,then prove that $(a_1,a_2,a_3,a_4,a_5)=(0,0,0,0,0)$ If $a_1+a_2\sin x+a_3\cos x+a_4\sin 2x+a_5\cos 2x=0$ is an identity in $x$,then prove that $(a_1,a_2,a_3,a_4,a_5)=(0,0,0,0,0)$
I tried:$a_1+a_2\sin x+a_3\cos x+a_4\sin 2x+a_5\cos 2x=0$
$a_1+a_2\sin x+a_3\cos x+2a_4\sin x\cos x+a_5(2\cos^2x-1)=0$
$a_1-a_5+a_2\sin x+a_3\cos x+2a_4\sin x\cos x+2a_5\cos^2x=0$
How do i prove that $a_1,a_2,a_3,a_4,a_5$ are all zero?
 A: By repeated differentiating we obtain
$$\tag1 a_2\cos x-a_3\sin x+2a_4\cos 2x-2a_5\sin 2x=0$$
$$\tag2 -a_2\sin x-a_3\cos x-4a_4\sin 2x-4a_5\cos 2x=0$$
$$\tag3 -a_2\cos x+a_3\sin x-8a_4\cos 2x+8a_5\sin 2x=0$$
So by adding $(1)+(3)$
$$ 6a_5\sin 2x-6a_4\cos2x=0.$$
At $x=0$ this gives us $a_4=0$, and also $a_5=0$ from $x=\frac\pi4$.
With this, $(1)$ simplifies to
$$ a_2\cos x-a_3\sin x=0$$
whence we find $a_2=0$ from $x=0$ and $a_3=0$ from $x=\frac\pi2$.
Plug into the original equation to obtain $a_1=0$.
A: I don't know if you can use the Fourier Transform. I am pretty sure this applies to this identity.
$$
a_1 + a_2 \sin x + a_3 \cos x + a_4 \sin 2x + a_5 \cos 2x = 0
$$
By the Fourier Transform, I will only care when $ x \in [0, 2\pi] $ so it has bounded norm (technicality),
$$
a_1 \frac{1}{\sqrt{2\pi}}\int \partial x e^{-ikx} + a_2 \frac{\sqrt{2\pi}}{2i}(\delta(x - 1) - \delta(x + 1)) + a_3 \frac{\sqrt{2\pi}}{2}(\delta(x - 1) + \delta(x + 1)) + a_4 \frac{\sqrt{2\pi}}{2i}(\delta(x - 2) - \delta(x + 2)) + a_5 \frac{\sqrt{2\pi}}{2}(\delta(x - 2) + \delta(x + 2)) = 0
$$
You can see that the Dirac Delta's don't cancel out and the first integral won't cancel them out at the integral will be non-zero in areas where the delta is zero. Thus the only way to satisfy the identity is to set the coefficients to zero.
A: Set $x=0$ for a start giving $$a_1+a_3+a_5=0$$
Try some other convenient particular values of $x$ and you get a system of linear equations in the $a_i$. Choose well and the equations give no non-trivial solutions.
This uses the fact that an identity in $x$ must hold for particular values of $x$
Taking also $x=\frac \pi 2, \pi, \frac {3\pi}2$ gives
$$a_1+a_2-a_5=0$$
$$a_1-a_3+a_5=0$$
$$a_1-a_2-a_5=0$$
Add the four equations to obtain $4a_1=0$ so that $a_1=0$
Add the first two (noting $a_1=0$) to get $a_2+a_3=0$. Add the middle two to get $a_2-a_3=0$ whence $a_2=a_3=0$. Then $a_5=0$ from any equation, and going back to the original identity $a_4=0$

Fourier analysis works easily because it picks out one term from the original sum, and easily solves generalisations of this. The method here works by sampling - and to get an easy calculation, you have to choose the right values of $x$ to sample.
A: It also could be proved in spirit of linear algebra. 
Of course, continuous real-valued functions at $\lbrack 0, 2\pi \rbrack$ form a real vector space. Observe that $\sin nx$ and $\cos mx$ ($n, m \in \mathbb{Z}, \; n > 0, \; m \geqslant 0$) form an orthogonal family of functions at $\lbrack 0 , 2 \pi \rbrack$ with respect to dot product defined by $\langle u, v \rangle = \int\limits_{0}^{2\pi} uv \: dx$. (It's very easy to prove because $\int\limits_{0}^{2\pi} \sin nx \: dx = 0$ ($n \in \mathbb{Z}$) and $\int\limits_{0}^{2\pi} \cos mx \: dx = 0$ ($m \in \mathbb{Z} \setminus \lbrace 0 \rbrace$) and every product $\sin nx \cos mx$, $\cos nx \cos mx$ or $\sin nx \sin mx$ can be expanded as sum of sines or cosines) So if we form a dot product of expression at LHS with $\sin x$ then we'll get that $a_2 \cdot \langle \sin x, \sin x \rangle = 0$ and since $\langle \sin x, \sin x \rangle \neq 0$ we deduce that $a_2 = 0$. And we can similarly deduce that other coefficients $a_i$ are zero too.
