# University of Florida/Egm4313/s12.team11.imponenti/R7.3

## R7.3

#### Problem Statement

Find (a) the scalar product, (b) the magnitude of ${\displaystyle f\!}$ and ${\displaystyle g\!}$ ,(c) the angle between ${\displaystyle f\!}$ and ${\displaystyle g\!}$ for:

1) ${\displaystyle f(x)=cos(x),\ g(x)=x\ for-2\leq x\leq 10\!}$

2) ${\displaystyle f(x)={\frac {1}{2}}(3x^{2}-1),\ g(x)={\frac {1}{2}}(5x^{3}-3x)\ for-1\leq x\leq 1\!}$

#### Part 2

solved by Luca Imponenti

##### Scalar Product

${\displaystyle =\int _{a}^{b}f(x)g(x)\ dx\!}$

${\displaystyle =\int _{-1}^{1}[{\frac {1}{2}}(3x^{2}-1)][{\frac {1}{2}}(5x^{3}-3x)]\ dx\!}$

${\displaystyle =\int _{-1}^{1}{\frac {1}{4}}(15x^{5}-4x^{3}+3x)\ dx\!}$
${\displaystyle =\left.{\frac {1}{4}}({\frac {15}{6}}x^{6}-x^{4}+{\frac {3}{2}}x^{2})\right|_{-1}^{1}\!}$
${\displaystyle ={\frac {1}{4}}[({\frac {15}{6}}1^{6}-1^{4}+{\frac {3}{2}}1^{2})-({\frac {15}{6}}(-1)^{6}-(-1)^{4}+{\frac {3}{2}}(-1)^{2})]\!}$

Since all exponents are even, everything in brackets cancels out

                      ${\displaystyle =0\!}$

##### Magnitude

${\displaystyle \|f\|=^{1/2}=\int _{a}^{b}f^{2}(x)\ dx\!}$

${\displaystyle =\int _{-1}^{1}[{\frac {1}{2}}(3x^{2}-1)]^{2}\ dx\!}$
${\displaystyle =\int _{-1}^{1}{\frac {1}{4}}(9x^{4}-6x^{2}+1)\ dx\!}$
${\displaystyle =\left.{\frac {1}{4}}({\frac {9}{5}}x^{5}-2x^{3}+x)\right|_{-1}^{1}\!}$
${\displaystyle ={\frac {1}{4}}[({\frac {9}{5}}1^{5}-2(1)^{3}+1)-({\frac {9}{5}}(-1)^{5}-2(-1)^{3}+(-1))]\!}$
${\displaystyle ={\frac {1}{4}}[{\frac {4}{5}}-(-{\frac {4}{5}})]\!}$
                       ${\displaystyle \|f\|={\frac {2}{5}}\!}$


${\displaystyle \|g\|=\int _{a}^{b}g^{2}(x)\ dx\!}$

${\displaystyle =\int _{-1}^{1}[{\frac {1}{2}}(5x^{3}-3x)]^{2}\ dx\!}$
${\displaystyle =\int _{-1}^{1}{\frac {1}{4}}(25x^{6}-30x^{4}+9x^{2})\ dx\!}$
${\displaystyle =\left.{\frac {1}{4}}({\frac {25}{7}}x^{7}-6x^{5}+3x^{3})\right|_{-1}^{1}\!}$
${\displaystyle ={\frac {1}{4}}[({\frac {25}{7}}1^{7}-6(1)^{5}+3(1)^{3})-({\frac {25}{7}}(-1)^{7}-6(-1)^{5}+3(-1)^{3})]\!}$
${\displaystyle ={\frac {1}{4}}[{\frac {4}{7}}-(-{\frac {4}{7}})]\!}$
                       ${\displaystyle \|g\|={\frac {2}{7}}\!}$

##### Angle Between Functions

${\displaystyle cos(\theta )={\frac {}{\|f\|\|g\|}}\!}$

Since ${\displaystyle =0\!}$ the two functions are orthogonal

                         ${\displaystyle \theta =90\!}$