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

$\begingroup$

In the vector space of $f:\mathbb R \to \mathbb R$, how do I prove that functions $\sin(x)$ and $\cos(x)$ are linearly independent. By def., two elements of a vector space are linearly independent if $0 = a\cos(x) + b\sin(x)$ implies that $a=b=0$, but how can I formalize that? Giving $x$ different values? Thanks in advance.

$\endgroup$ 1

11 Answers

$\begingroup$

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}$

$\endgroup$ 3 $\begingroup$

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$.

$\endgroup$ 1 $\begingroup$

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$.

$\endgroup$ 2 $\begingroup$

This is an infinite-dimensional linear problem, because the space $\mathbb{R}^\mathbb{R}$ of real functions of a real variable has not finite dimension. Therefore you cannot use the typical tools of linear algebra: matrices, determinants and the like. To overcome this difficulty you can try sampling the two functions at some points (nodes, to use a more technical jargon) to be determined. Indeed we can prove the following proposition.

Proposition. Let $f_1\ldots f_n \colon \mathbb{R}\to \mathbb{R}$. Suppose that there exist points $(x_1\ldots x_n)$ such that \begin{align} &[f_1(x_1),&f_2(x_1),&\ldots& f_n(x_1)] \\ &[f_1(x_2),&f_2(x_2),& \ldots& f_n(x_2)] \\ &&&\vdots&\\ &[f_1(x_n),&f_2(x_n),&\ldots& f_n(x_n)] \end{align} are linearly independent vectors in $\mathbb{R}^n$. Then the functions $f_1\ldots f_n$ are linearly independent.

Proof If the coefficients $a_1\ldots a_n\in \mathbb{R}$ are such that $$\tag{1}a_1 f_1+\ldots +a_nf_n=0, $$ then evaluating (1) at $x_1\ldots x_n$ we have \begin{align} a_1f_1(x_1) +\ldots +a_nf_n(x_1)&=0 \\ &\vdots\\ a_1f_1(x_n)+\ldots +a_nf_n(x_n)&=0 \end{align} which can be rewritten in matrix form \begin{equation} \begin{bmatrix} f_1(x_1) & \ldots & f_n(x_1) \\ \ldots& \ldots &\ldots \\ f_1(x_n) & \ldots & f_n(x_n) \end{bmatrix} \begin{bmatrix} a_1\\ \vdots \\ a_n \end{bmatrix} =0. \end{equation} By assumption the coefficient matrix is nonsingular and so this equation only has the trivial solution $(a_1\ldots a_n)=(0\ldots 0)$. This proves that $f_1\ldots f_n$ are linearly independent. $\square$

For the case at hand, we have two functions so $n=2$. Choosing nodes $x_1=0, x_2=\pi/2$ we get the sampled vectors $(1, 0), (0, 1)$, which clearly are linearly independent.

$\endgroup$ 5 $\begingroup$

$$b\sin(x)=-a\cos(x)$$ The left side is odd, the right side is even, thus they cannot be equal for all $x$, as if the functions are equal for (say) positive $x$, they must be equal in magnitude but with opposite signs for negative $x$, unless $a=b=0$ (this is true in general for all pairs of nonzero even and odd functions).

$\endgroup$ $\begingroup$

If both are linearly dependent then, by assuming $ x \neq 0$ or $n\pi$ for $n \in \mathbb Z$

$$\cos(x)/\sin(x) = -b/a$$

now let $x = \pi/2$ so $b = 0$;

but then $$ a\sin(x) = 0$$ let $ x = \pi/2$ so $$a =0$$

$\endgroup$ $\begingroup$

The vector space you mention is $V = \{f : \mathbb R \to \mathbb R\}$. The elements $\sin x, \cos x$ also belong to the subspace $U = \{f : \mathbb R \to \mathbb R \;|\; \text{$f$ continuous, $2\pi$-periodic}\} \subset V$, which we give the usual inner-product $\langle f, g \rangle = \int_0^{2\pi} f g$. Using a double-angle identity and the fact that $\sin x$ is an odd function, $$ \langle \sin x, \cos x \rangle = \int_0^{2\pi} \sin(x) \cos(x) \, dx = \frac{1}{2} \int_0^{2\pi} \sin(2x) \, dx = 0, $$ so $\sin x$ and $\cos x$ are orthogonal, therefore linearly independent, in $U$ and hence also in $V$.

$\endgroup$ $\begingroup$

Although I'm not confident about this, maybe you can use power series for $\sin x$ and $\cos x$? I'm working on a similar exercise but mine has restricted both functions on the interval $[0,1]$.

$\endgroup$ 1 $\begingroup$

Does this work?

Assume that $\sin(x)$ and $\cos(x)$ are linearly dependent. Then one must be a scalar multiple of the other, that is

$$\sin(x) = a * \cos(x)$$

But for $x=\pi/2$, we have

$$1 = a * 0$$

which is impossible. Thus $\sin(x)$ and $\cos(x)$ are linearly independent.

I have a feeling that there is some error in my reasoning here, please point it out if you see one :)

$\endgroup$ 1 $\begingroup$

I think that you should verify $a\cos(x)+b\sin(x)=0$ for every $x$ implies $$a=b=0$$

$\endgroup$ 6 $\begingroup$

If Cos(x) and sin(x) are linearly independent, then this implies.

acos(x)+bsin(x)=0 if and only if (for all values of x) a=b=0.

But!! For x=pi/4 rad; cos(pi/4)=sin(pi/4)= sqrt(2)/2 and for a=1 and b=-1 we get: (1)*sqrt(2)/2 +(-1)*sqrt(2)/2 which is sqrt(2)/2-sqrt(2)/2=0. Therefore: cos(x) and sin(x) cannot be linearly independent.

$\endgroup$ 2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like