linearly independent for set of functions I am given a multitude $$S=\left\{ \sin(x),\sin^{2}(x),\cos(x),\cos^{2}(x)\right\}  $$ of functions over set $V=span\left(S\right)$ over $\mathbb{R}$.
I am suppose to prove that $S$ is linearly independent, find the $dim(V)$, and prove that the constant function $1 \in V$.
Some tips on how I do this, because I have no idea how to do this when there are functions.
 A: The easy part is to show that $ 1\in Span(S)$ is by taking $$ 1=a\sin\left(x\right)+b\sin^{2}\left(x\right)+c\cos\left(x\right)+d\cos^{2}\left(x\right) $$
Taking $$ \left(\begin{array}{c}
a\\
b\\
c\\
d
\end{array}\right)=\left(\begin{array}{c}
0\\
1\\
0\\
1
\end{array}\right) $$
Gives us the desired result based of a trig identity.
Next, let's show that $S$ is linearly independent.
What we need to show is that there are no solutions to $$ 0=a\sin\left(x\right)+b\sin^{2}\left(x\right)+c\cos\left(x\right)+d\cos^{2}\left(x\right) $$ such that $a,b,c,d \ne 0 $ for every $x\in \mathbb{R} $.
Because it is true for every $ x $ lets look at $x=0 $ first.
$$ 0=a\sin\left(0\right)+b\sin^{2}\left(0\right)+c\cos\left(0\right)+d\cos^{2}\left(0\right)\Rightarrow0=c+d=0 $$
Lets look at $ x=\pi $ now.
$$ 0=a\sin\left(\pi\right)+b\sin^{2}\left(\pi\right)+c\cos\left(\pi\right)+d\cos^{2}\left(\pi\right)\Rightarrow0=-c+d=0 $$
So far we found that $ c,d=0 $.
Now let's do the same for $ x=\frac{\pi}{2} $.
$$ 0=a\sin\left(\frac{\pi}{2}\right)+b\sin^{2}\left(\frac{\pi}{2}\right)+c\cos\left(\frac{\pi}{2}\right)+d\cos^{2}\left(\frac{\pi}{2}\right)\Rightarrow0=a+b=0 $$
And one more for $ x=-\frac{\pi}{2} $.
$$ 0=a\sin\left(-\frac{\pi}{2}\right)+b\sin^{2}\left(-\frac{\pi}{2}\right)+c\cos\left(\frac{\pi}{2}\right)+d\cos^{2}\left(\frac{\pi}{2}\right)\Rightarrow0=-a+b=0 $$
After solving this linear equation we get that also $a,b=0 $.
To conclude, we found that we need $a=b=c=d=0 $ in order to allow $$ 0=a\sin\left(x\right)+b\sin^{2}\left(x\right)+c\cos\left(x\right)+d\cos^{2}\left(x\right) $$ for all $x\in \mathbb{R} $.
