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

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

1) $$f(x)=cos(x), \ g(x)=x \ for -2 \le x \le 10\!$$

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

Part 2
solved by Luca Imponenti

Scalar Product
$$=\int_a^bf(x)g(x) \ dx\!$$

$$=\int_{-1}^{1}[\frac{1}{2}(3x^2-1)][\frac{1}{2}(5x^3-3x)] \ dx\!$$
 * $$=\int_{-1}^{1}\frac{1}{4}(15x^5-4x^3+3x) \ dx\!$$
 * $$=\left. \frac{1}{4}(\frac{15}{6}x^6-x^4+\frac{3}{2}x^2)\right|_{-1}^{1}\!$$
 * $$=\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

$$=0\!$$

Magnitude
$$\| f \|=^{1/2}=\int_{a}^{b} f^2(x) \ dx\!$$
 * $$=\int_{-1}^{1} [\frac{1}{2}(3x^2-1)]^2 \ dx\!$$
 * $$=\int_{-1}^{1} \frac{1}{4}(9x^4-6x^2+1) \ dx\!$$
 * $$=\left. \frac{1}{4}(\frac{9}{5}x^5-2x^3+x)\right|_{-1}^{1}\!$$
 * $$=\frac{1}{4}[(\frac{9}{5}1^5-2(1)^3+1)-(\frac{9}{5}(-1)^5-2(-1)^3+(-1))]\!$$
 * $$=\frac{1}{4}[\frac{4}{5}-(-\frac{4}{5})]\!$$

$$\| f \| =\frac{2}{5}\!$$

$$\| g \|=\int_{a}^{b} g^2(x) \ dx\!$$
 * $$=\int_{-1}^{1} [\frac{1}{2}(5x^3-3x)]^2 \ dx\!$$
 * $$=\int_{-1}^{1} \frac{1}{4}(25x^6-30x^4+9x^2) \ dx\!$$
 * $$=\left. \frac{1}{4}(\frac{25}{7}x^7-6x^5+3x^3)\right|_{-1}^{1}\!$$
 * $$=\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)]\!$$
 * $$=\frac{1}{4}[\frac{4}{7}-(-\frac{4}{7})]\!$$

$$\| g \| =\frac{2}{7}\!$$

Angle Between Functions
$$cos(\theta)=\frac{}{\| f \| \| g \|}\!$$

Since $$=0\!$$ the two functions are orthogonal

$$\theta=90\!$$