# Inner product space problem

First of all, I apologize for my English. I'm Spanish, so I hope you can all understand me.

Here is my problem. Given the inner product:

$$\int_0^\pi f(x)g(x)dx\$$

in the space of continuos real valued functions, I have to calculate the angle between the vectors $\sin(x)$ and $\cos(x)$.

I know the formula, that is a consequence of the Cauchy–Schwarz inequality, but I am having trouble calculating the norm of the vectors.

Also, is this angle unique or varies according to the inner product? And what about the norm of a vector? Why?

Thank you!

• I´ve just realized that, in this case, I don´t need to calculate the norm of the vector, as the inner product is zero... But anyway, it is good to know how to do it, just in case. – Lessa121 Dec 7 '13 at 20:39
• Your English is great. No need to apologize, really. – Julien Dec 7 '13 at 20:45
• Thank you! You are so nice! But I have no way of realizing if it's good or not, so I say it just in case somebody do not understand me – Lessa121 Dec 7 '13 at 20:48
• If something was unclear, people would ask you to clarify, no worries. – Julien Dec 7 '13 at 20:52
• Alright then! I won´t say it again in the next bazillion questions that I probably will ask here :D Thank you all for your help! – Lessa121 Dec 7 '13 at 21:00

Hint: if you call $\;\theta\;$ the wanted angle, then

$$\cos\theta=\frac{\langle \sin x,\cos x\rangle}{||\sin x||\,||\cos x||}$$

For example

$$||\sin x||=\left(\int\limits_0^\pi\sin^2x\,dx\right)^{1/2}=\left(\left.\frac12(x-\sin x\cos x)\right|_0^\pi\right)^{1/2}=\sqrt\frac\pi2$$

and now use the above to evaluate $\;||\cos x||\;$ (hint: it's the same value...), but the really easy value and what solves at once the whole exercise is $\;\langle\sin x,\cos x\rangle\;\ldots\ldots$

• Yes, thank you! I´ve just realized that the vectors are orthogonal – Lessa121 Dec 7 '13 at 20:52

Well, the norm is the square root of the inner product of the vector with itself, so, for example, $|\cos x| = \sqrt{\int_0^\pi \cos^2 x d x}.$

The angle will certainly change with the inner product.

• Thanks! And the norm? It also depends on the product? – Lessa121 Dec 7 '13 at 20:22
• You should integrate the $\sin^2 x$ and $\cos^2 x$ yourself... – Igor Rivin Dec 7 '13 at 20:22
• Well, yes, but I am not asking about this example in particular. I was wondering if there was any theorem or lemma that can assure me that the norm of the vector does, or does not, vary... – Lessa121 Dec 7 '13 at 20:25
• The norm of the vector will certainly vary depending on which norm you choose, so you will have to recompute every time you get a new norm :( – Igor Rivin Dec 7 '13 at 20:27
• you mean depending on the product i choose right? – Lessa121 Dec 7 '13 at 20:28