Find the dimension and basis of $P=c_{0}+c_{1}\sin(x)\cos(x)+c_{2}\cos^{2}(x)+c_{3}\sin^{2}(x)$ Let $P$ be the set of all functions of the form $P=c_{0}+c_{1}\sin(x)\cos(x)+c_{2}\cos^{2}(x)+c_{3}\sin^{2}(x)$, where $c_0, c_1, c_2, c_3$ are arbitrary real numbers. It is known that $P$ is a linear space under the usual function addition and scalar multiplication. Find the dimension and a basis for $P$.
I'm a new student to linear algebra, and this question is really confusing, especially the "arbitrary number" part.
I'm thinking that $P$ has dimension $4$, and a basis of it is {$1, \sin(x)\cos(x), \cos^{2}(x), {3}\sin^{2}(x)$} but it kinda just sounds wrong, and I've been stuck with this for more than 2 hours. I really appreciate any help.
 A: The set $\mathcal P$ of those functions is spanned by $\{1,\sin\cos,\sin^2,\cos^2\}$, and therefore, its dimension is at most $4$. But it is not $4$, since $\sin^2+\cos^2=1$. So, $\mathcal P$ is, in fact, spanned by$$\{1,\sin\cos,\sin^2\}.\tag1$$Is $\dim\mathcal P=3$? This is so if and only if $(1)$ is linearly independent. So, take $a,b,c\in\Bbb R$ such that $a+b\sin\cos+c\sin^2=1$. Then:

*

*$a+b\sin(0)\cos(0)+c\sin^2(0)=0$, and therefore $a=0$;

*$b\sin\left(\frac\pi2\right)\cos\left(\frac\pi2\right)+c\sin^2\left(\frac\pi2\right)=0$, and therefore $c=0$;

*$b\sin\left(\frac\pi4\right)\cos\left(\frac\pi4\right)=0$, and therefore $b=0$.

So, the set $(1)$ is indedd linearly independent and therefore $\dim\mathcal P=3$.
A: First of all recall the formula $\sin^2 x=1-\cos^2 x$ what does that say about the span?
Next observe that if $c_1+c_2\sin x \cos x+c_3\sin x \sin x=0$ then it implies that $c_1=0$ just evaluate at $x=0$ and then show that $c_2=c_3=0$
A: $P=\operatorname{span}(S) =\operatorname{span} \{1, \sin x \space\cos x, \cos^2 x, \sin^2 x \}$ is linear subspace of space of all functions.
Is the set $S$ Linearly independent?
$ \sin^2 x + \cos^2 x =1$
$\operatorname{span}(S)=\operatorname{span}\{\sin^2 x, \cos^2 x, \sin x \space{   }\cos x\} $
Linearly independent can be checked using Wronskian.
$\dim(\operatorname{span}(S)) =3$
Let, $f_1=\cos^2(x)$ , $f_2=\sin^2 x$ $f_3=\sin x \space{  }\cos x$
\begin{align} W{\left(f_{1},f_{2},f_{3} \right)}\left(x\right)  &= \left|\begin{array}{ccc}\cos^{2}{\left(x \right)} & \sin^{2}{\left(x \right)} & \sin{\left(x \right)} \cos{\left(x \right)}\\\left(\cos^{2}{\left(x \right)}\right)^{\prime } & \left(\sin^{2}{\left(x \right)}\right)^{\prime } & \left(\sin{\left(x \right)} \cos{\left(x \right)}\right)^{\prime }\\\left(\cos^{2}{\left(x \right)}\right)^{\prime \prime } & \left(\sin^{2}{\left(x \right)}\right)^{\prime \prime } & \left(\sin{\left(x \right)} \cos{\left(x \right)}\right)^{\prime \prime }\end{array}\right|\\&=\left|\begin{array}{ccc}\cos^{2}{\left(x \right)} & \sin^{2}{\left(x \right)} & \sin{\left(x \right)} \cos{\left(x \right)}\\- \sin{\left(2 x \right)} & \sin{\left(2 x \right)} & \cos{\left(2 x \right)}\\- 2 \cos{\left(2 x \right)} & 2 \cos{\left(2 x \right)} & - 2 \sin{\left(2 x \right)}\end{array}\right|\\
&=-2\neq 0\end{align}
Hence, $\{\sin^2 x, \cos^2 x, \sin x \space{   }\cos x\} $ is Linearly Independent set  of $3$ vectors.
