# Find the Orthogonal Projection of f onto g. Use the inner product in C[a,b]

$C[-\pi, \pi], f(x)=x$ and $g(x)= \cos 2x$ I am having a difficulties integrating this function. I dont know where I am messing up. Please help me :D

-
and I don't know, what you mean? Maybe $\int_{-\pi}^\pi x\cos 2x dx$? This is $0$, do you know why$– draks ... Feb 27 '12 at 15:40 well idk latex but I will show u the formula – Sarah Feb 27 '12 at 15:59 (<f,g>)/(<g,g>)g – Sarah Feb 27 '12 at 16:00 so <f,g> is what u have showed but i don't get know how to integrate that function – Sarah Feb 27 '12 at 16:01 ohh i see. ya I get it now soit orthogonal already ok thanks @draks – Sarah Feb 27 '12 at 16:06 show 5 more comments ## 1 Answer Here are three approaches for calculating$\int_{-\pi}^\pi x\cos 2x$. These are only hints, as this is a homework problem: 1. Use integration by parts, by defining$f(x)=x,\ g(x)=\cos 2x$. 2. Use the fact that the integrand is an odd function of$x$. What is the integral of an odd function on a segment that is symmetric around$0\$?
3. Ask Wolfram Alpha and click "show steps".
-
Thanks @yohBS That was helpful –  Sarah Feb 27 '12 at 16:24