Linear independence of $\sin(x)$ and $\cos(x)$

Hint: If $a\cos(x)+b\sin(x)=0$ for all $x\in\mathbb{R}$ then it is especially true for $x=0,\frac{\pi}{2}$


There are easier ways - eg take special values for $x$. The following technique is a sledgehammer in this case, but a useful one to have around.

Suppose you have $a$ and $b$ as required. Let $r=\sqrt{a^2+b^2}$ and $\phi = \arctan {\frac a b}$ (take $\phi=\frac {\pi} 2$ if $b=0$). Then we have: $$a \cos (x)+b\sin(x)=r\sin(\phi)\cos(x)+r\cos(\phi)\sin(x)=r\sin(x+\phi)$$

The last form is identically zero only if $r=0$, which immediately implies $a=b=0$ from the definition of $r$.


One way to show linear independence is to use the Wronskian of $f$ and $g$, denoted by $$W(f,g)(x):=\begin{vmatrix}f(x) & g(x)\\ f'(x) & g'(x)\end{vmatrix}=f(x)g'(x)-g(x)f'(x), \quad x\in I.$$

There is a classic theorem which says that if $f,g$ are differentiable on $I$ and $W(f,g)(x_0)\not=0$ for some $x_0\in I$, then $f$ and $g$ are linearly independent on $I$.

So, in your case, $$W(\sin x,\cos x)=\sin x\cdot (-\sin x)-\cos x\cdot \cos x=-\sin^2 x-\cos^2 x=-1\not=0 \text{ for any }I,$$ so $\sin x$ and $\cos x$ are linearly independent on any interval $I$.