Show that $(7\cos(x)-\sin(x))^2=A\cos(2x)+B\sin(2x)+C$ for some integers $A,B,C$ How do you solve this question?:$$(7\cos(x)-\sin(x))^2=A\cos(2x)+B\sin(2x)+C$$ is for all $x$. Here $A$, $B$ and $C$ is constants. I need to know $A$, $B$ and $C$ to pass this. They are  integers. 
I got this far:
(LS = left side)
$$LS =  49\cos^2(x)+\sin^2(x)+14\sin(x)\cos(x)$$
And then i follow some steps online and got right side to
$$RS = (A+C)\cos^2(x)+(C-A)\sin^2(x)+2B\sin(x)\cos(x)$$
Only problem is that i get C to 49/2.

Anything forall x implies an identity so you can put any * values of x to get C. for e.g.:
$$(7\cos(x)-\sin(x))^2=A\cos(2x)+B\sin(2x)+C$$
$$
\left\{ 
\begin{array}{c}
49=A+C\quad x=0  \\ 
1=-A+C\quad x=\pi/2\\
18=B+C\\ 
\end{array}
\right. 
$$
Solving these we get: 
$$
\left\{ 
\begin{array}{c}
A=24  \\ 
C=25\\
B=-7\\
\end{array}
\right. 
$$

Alternatively:
$$(7\cos(x)-\sin(x))^2=49\cos^2x+\sin^2x-14\cos x\sin x
\\=49\left(\frac{1+\cos{2x}}2\right)+\left(\frac{1-\cos{2x}}2\right)-7\sin 2x
\\=24\cos 2x-7\sin 2x+25$$
So $A=24,B=-7,C=25$

Use:
$$\cos 2x=2\cos^2x-1=1-2\sin^2x,\sin 2x=2\sin x\cos x$$
