Find (a) the scalar product, (b) the magnitude of f {\displaystyle f\!} and g {\displaystyle g\!} ,(c) the angle between f {\displaystyle f\!} and g {\displaystyle g\!} for:
1) f ( x ) = c o s ( x ) , g ( x ) = x f o r − 2 ≤ x ≤ 10 {\displaystyle f(x)=cos(x),\ g(x)=x\ for-2\leq x\leq 10\!}
2) f ( x ) = 1 2 ( 3 x 2 − 1 ) , g ( x ) = 1 2 ( 5 x 3 − 3 x ) f o r − 1 ≤ x ≤ 1 {\displaystyle f(x)={\frac {1}{2}}(3x^{2}-1),\ g(x)={\frac {1}{2}}(5x^{3}-3x)\ for-1\leq x\leq 1\!}
solved by Luca Imponenti
< f , g >= ∫ a b f ( x ) g ( x ) d x {\displaystyle <f,g>=\int _{a}^{b}f(x)g(x)\ dx\!}
< f , g >= ∫ − 1 1 [ 1 2 ( 3 x 2 − 1 ) ] [ 1 2 ( 5 x 3 − 3 x ) ] d x {\displaystyle <f,g>=\int _{-1}^{1}[{\frac {1}{2}}(3x^{2}-1)][{\frac {1}{2}}(5x^{3}-3x)]\ dx\!}
Since all exponents are even, everything in brackets cancels out
< f , g >= 0 {\displaystyle <f,g>=0\!}
‖ f ‖ =< f , f > 1 / 2 = ∫ a b f 2 ( x ) d x {\displaystyle \|f\|=<f,f>^{1/2}=\int _{a}^{b}f^{2}(x)\ dx\!}
‖ f ‖ = 2 5 {\displaystyle \|f\|={\frac {2}{5}}\!}
‖ g ‖ = ∫ a b g 2 ( x ) d x {\displaystyle \|g\|=\int _{a}^{b}g^{2}(x)\ dx\!}
‖ g ‖ = 2 7 {\displaystyle \|g\|={\frac {2}{7}}\!}
c o s ( θ ) = < f , g > ‖ f ‖ ‖ g ‖ {\displaystyle cos(\theta )={\frac {<f,g>}{\|f\|\|g\|}}\!}
Since < f , g >= 0 {\displaystyle <f,g>=0\!} the two functions are orthogonal
θ = 90 {\displaystyle \theta =90\!}