User:Egm4313.s12.team1.armanious/scrap

Statement
Find the scalar product , the magnitude of f and g, and the angle between f and g for (see R7.3 Lect. 11-1 pg. 8): 1) $$f(x)=\cos x, g(x)=x, \text{for} -2\leq x \leq 10\!$$ 2) $$f(x)=\frac12(3x^2-1), g(x)=\frac12(5x^3-3x), \text{for} -1\leq x \leq +1\!$$

Solution
The scalar product, the function equivalent of the vector dot product, of two functions can be found in the following way:
 * {| style="width:100%" border="0"

$$  \displaystyle :=\int^b_af(x)g(x)dx $$     (3.0) The magnitude of a function is defined as the square root of the scalar product between the function and itself:
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle ||f||:=^{1/2}=\left [\int^b_af^2(x)dx \right ]^{1/2} $$     (3.1) The cosine of the angle between two functions can be found in the following way:
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \cos \theta = \frac{}{||f||||g||} $$     (3.2) Note that these equations are very similar to their vector counterparts. Part 1
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle f(x)=\cos x, g(x)=x, \text{for} -2\leq x \leq 10 $$     (3.3) The scalar product of f and g can be found using (3.0):
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle =\int_{-2}^{10}x\cos (x) dx=\left [ x\sin(x)+cos(x) \right ]_{-2}^{10} $$     (3.4) Solving this yields the scalar product:
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="1"

$$  \displaystyle (10\sin10+\cos10)-(-2\sin(-2)+\cos(-2))=-7.68 $$     (3.5) To find the magnitude of f, the scalar product of f with itself must first be found:
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle =\int_{-2}^{10}\cos^{2}(x)dx=\int_{-2}^{10}\left (\frac12\cos(2x)+\frac12 \right )dx=\left [ \frac14\sin(2x)+\frac12x \right ]_{-2}^{10} $$     (3.6) Solving this yields:
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \left [ \frac14\sin(2x)+\frac12x \right ]_{-2}^{10}=\left ( \frac14\sin(20)+5 \right )-\left ( \frac14\sin(-4)-1 \right )=6.04 $$     (3.7) Therefore the magnitude of f is found to be:
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="1"

$$  \displaystyle $$     (3.8) A similar approach can be taken for the magnitude of g:
 * style="width:95%" |
 * style="width:95%" |
 * f||=^{1/2}=\sqrt{6.04}=2.46
 * 
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle <g,g>=\int_{-2}^{10}x^2dx=\left [ \frac{x^3}{3} \right ]_{-2}^{10} $$     (3.9)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \left [ \frac{x^3}{3} \right ]_{-2}^{10}=\frac{1000}3-\frac{-8}{3}=\frac{1008}{3}=336 $$     (3.10)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="1"

$$  \displaystyle $$     (3.11) Using the above information with (3.2), the cosine of the angle between f and g is found to be
 * style="width:95%" |
 * style="width:95%" |
 * g||=<g,g>^{1/2}=\sqrt{336}=18.33
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \cos \theta = \frac{<f,g>}{||f||||g||}=\frac{-7.68}{(2.46)(18.33)}=-0.1705 $$     (3.12) Therefore, the angle between the functions f and g is
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="1"

$$  \displaystyle \theta =\cos^{-1}(-0.1705)=1.74rad=99.8^{\circ} $$     (3.13) Part 2
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle f(x)=\frac12(3x^2-1), g(x)=\frac12(5x^3-3x), \text{for} -1\leq x \leq +1 $$     (3.14) The scalar product of f and g can be found using (3.0):
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle <f,g>=\int_{-1}^{1}\frac14\left ( 3x^2-1 \right )\left ( 5x^3-3x \right ) dx=\frac14\int_{-1}^{1}\left ( 15x^5-14x^3+3x \right ) dx=\frac14\left [ \frac{15}{6}x^6-\frac{14}{4}x^4+\frac32x^2 \right ]_{-1}^{1} $$     (3.15) Solving this yields the scalar product:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="1"

$$  \displaystyle \frac14\left [ \frac52x^6-\frac72x^4+\frac32x^2 \right ]_{-1}^{1}=\frac14\left ( \frac12-\frac12 \right )=0 $$     (3.16) To find the magnitude of f, the scalar product of f with itself must first be found:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle <f,f>=\int_{-1}^{1}\left (\frac12\left (3x^2-1 \right )\right)^2 dx=\frac14\int_{-1}^{1}\left (9x^4-6x^2+1  \right )dx=\frac14\left [ \frac95x^5-2x^3+x \right ]_{-1}^{1} $$     (3.17) Solving this yields:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac14\left [ \left( \frac95-2+1\right )-\left (-\frac95+2-1 \right ) \right ] =\frac14\left ( \frac45+\frac45 \right )=\frac25 $$     (3.18) Therefore the magnitude of f is found to be:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="1"

$$  \displaystyle $$     (3.19) A similar approach can be taken for the magnitude of g:
 * style="width:95%" |
 * style="width:95%" |
 * f||=<f,f>^{1/2}=\sqrt{0.4}=0.632
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle <g,g>=\int_{-1}^{1}\left (\frac12\left (5x^3-3x \right )\right)^2 dx=\frac14\int_{-1}^{1}\left (25x^6-15x^4+9x^2  \right )dx=\frac14\left [ \frac{25}{7}x^7-3x^5+3x^3 \right ]_{-1}^{1} $$     (3.20)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac12 \left (\frac{25}{7}-3+3 \right ) =\frac{25}{14} $$     (3.21)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="1"

$$  \displaystyle $$     (3.22) Using the above information with (3.2), the cosine of the angle between f and g is found to be
 * style="width:95%" |
 * style="width:95%" |
 * g||=<g,g>^{1/2}=\sqrt{\frac{25}{14}}=1.336
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \cos \theta = \frac{<f,g>}{||f||||g||}=\frac{0}{(0.632)(1.336)}=0 $$     (3.23) '''Because the scalar product of the two functions is zero, the two functions are orthogonal. That is:'''
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="1"

$$  \displaystyle \theta =\frac{\pi}{2}rad=90^{\circ} $$     (3.24)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Author
Solved and Typed By - Egm4313.s12.team1.armanious (talk) 23:48, 21 April 2012 (UTC) Reviewed By -