Write $\cos^2(x)$ as linear combination of $x \mapsto \sin(x)$ and $x \mapsto \cos(x)$

algebra-precalculuslinear algebratrigonometry

Can we write $\cos^2(x)$ as linear combination of $x \mapsto \sin(x)$ and $x \mapsto \cos(x)$?

I know
$$
\cos^2(x)
= \frac{\cos(2x) + 1}{2}
= 1 – \sin^2(x)
= \cos(2x) + \sin^2(x)
$$

but none of these helped.
Then, I tried to solve
$$
\cos^2(x) = \alpha \sin(x) + \beta \cos(x)
$$

for the coefficients $\alpha, \beta \in \mathbb{R}$.
But when plugging in $x = 0$ I get $\beta = 1$ and for $x = \frac{\pi}{2}$ I get $\alpha = 0$. Plugging those values back in I obtain a false statement, and WolframAlpha can't do better!

This is from a numerical analysis exam and the second function is $x \mapsto \sqrt{2}\cos\left(\frac{\pi}{4} – x \right)$, which can easily be expressed in terms of $x \mapsto \sin(x)$ and $x \mapsto \cos(x)$ by the corresponding addition formula.

Best Answer

The function $f(x):=\cos^2 x$ has $f(x+\pi)\equiv f(x)$, but any linear combination $g$ of $\cos$ and $\sin$ has $g(x+\pi)\equiv -g(x)$.

Related Question