# Vector space and Spanning

If $f(x)=(\sin x)^2$ and $g=(\cos x)^2$, would $\cos(2x)$ lie in space spanned by $f$ and $g$. What about $3+x$?

-
What have you tried? –  Zach L. Dec 13 '12 at 16:24
Take a look at the double angle formulas. Convince yourself that a linear combination of two bounded functions is bounded, and of course $\sin^2,\cos^2$ are both bounded - but $3+x$ is not bounded. Finally, this has nothing to do with Mathematica. –  anon Dec 13 '12 at 16:24
@ZachL. I know two conditions have to satisfy, 1-> If U and V are in vector space V, then U+V should also be in that V. 2-> If k is non-negative scalar then KU should also lie in vector space. I just don't know how to implement this concept on functions but I do know how it works on vectors –  Terrenium Dec 13 '12 at 16:30
@anon sorry, too early for me (last comment deleted) –  David Mitra Dec 13 '12 at 16:30
I just did give a mathematical explanation of how to answer your questions - or perhaps I misunderstand what you mean by "it" in your latest comment. (Also, why is this being downvoted? It isn't a great question, but I do not feel OP is being obstinate or anything deserving a -1.) –  anon Dec 13 '12 at 16:37

Can you write $\cos 2x$ as a linear combination of $\cos^2 x$ and $\sin^2 x$? So what can you say about whether or not it lies in the span?
As for $3+x$, consider instead the following:
If $f$ and $g$ are periodic (with the same period, $P$ say) then, for all scalars $a,b$, $af+bg$ is also periodic with period $P$.
Prove this first, and then deduce whether or not $3+x$ lies in the span.