# Subspace Spanned by Trigonometric Functions $\sin^2(x)$ and $\cos^2(x)$

## Problem 612

Let $C[-2\pi, 2\pi]$ be the vector space of all real-valued continuous functions defined on the interval $[-2\pi, 2\pi]$.
Consider the subspace $W=\Span\{\sin^2(x), \cos^2(x)\}$ spanned by functions $\sin^2(x)$ and $\cos^2(x)$.

(a) Prove that the set $B=\{\sin^2(x), \cos^2(x)\}$ is a basis for $W$.

(b) Prove that the set $\{\sin^2(x)-\cos^2(x), 1\}$ is a basis for $W$.

## Solution.

### (a) Prove that the set $B=\{\sin^2(x), \cos^2(x)\}$ is a basis for $W$.

By definition of the subspace $W=\Span\{\sin^2(x), \cos^2(x)\}$, the we know that $B$ is a spanning set for $W$.
Thus, it remains to show that $B$ is linearly independent set.
Suppose that
$c_1\sin^2(x)+c_2\cos^2(x)=0.$ This equality is true for all $x\in [-2\pi, 2\pi]$.

In particular, evaluating at $x=0$, we see that $c_2=0$.
Also, plugging in $x=\pi/2$ yields $c_1=0$.

Therefore, $\sin^2(x)$ and $\cos^2(x)$ are linearly independent, that is, $B$ is linearly independent.
As $B$ is a linearly independent spanning set, it is a basis for $W$.

### Prove that the set $\{\sin^2(x)-\cos^2(x), 1\}$ is a basis for $W$.

Note that $\sin^2(x)-\cos^2(x)$ and $1$ are both in $W$ since both functions are linear combination of $\sin^2(x)$ and $\cos^2(x)$. Here, we used the trigonometric identity $1=\sin^2(x)+\cos^(x)$.

By part (a), we see that $\dim(W)=2$. So if we show that the functions $\sin^2(x)-\cos^2(x)$ and $1$ are linearly independent, then they form a basis for $W$.

We consider the coordinate vectors of these functions with respect to the basis $B$.
We have
\begin{align*}
[\sin^2(x)-\cos^2(x)]_B=\begin{bmatrix}
1
\\ -1
\end{bmatrix}
\text{ and }\\
[1]_B=[\sin^2(x)+\cos^2(x)]_B=\begin{bmatrix}
1\\ 1
\end{bmatrix}.
\end{align*}

Since we have
\begin{align*}
\begin{bmatrix}
1& 1 \\
-1& 1
\end{bmatrix}
\xrightarrow{R_2+R_1}
\begin{bmatrix}
1& 1 \\
0& 2
\end{bmatrix}
\xrightarrow{\frac{1}{2}R_2}
\begin{bmatrix}
1& 1 \\
0& 1
\end{bmatrix}
\xrightarrow{R_1-R_1}
\begin{bmatrix}
1& 0 \\
0& 1
\end{bmatrix},
\end{align*}
the coordinate vectors are linearly independent, and hence $\sin^2(x)-\cos^2(x)$ and $1$ are linearly independent.
We conclude that $\{\sin^2(x)-\cos^2(x), 1\}$ is a basis for $W$.

(Another reasoning is that since the coordinate vectors form a basis for $\R^2$, $\{\sin^2(x)-\cos^2(x), 1\}$ is a basis for $W$.)

### Comment

You may directly show that $\{\sin^2(x)-\cos^2(x), 1\}$ is linearly independent just like we did for part (a).

### More from my site

#### You may also like...

##### Is the Set of All Orthogonal Matrices a Vector Space?

An $n\times n$ matrix $A$ is called orthogonal if $A^{\trans}A=I$. Let $V$ be the vector space of all real \$2\times...

Close