# University of Florida/Egm4313/s12.teamboss/R7

Report 7

## Problem R7.1: Determining Orthogonality

### Statement

Determine orthogonality of:

 ${\displaystyle \langle \phi _{i},\phi _{j}\rangle =0\ {\text{ for }}\ i\neq j}$ ${\displaystyle \langle \phi _{j},\phi _{j}\rangle ={\frac {L}{2}}\ {\text{ for }}\ i=j}$ (1.0)

Where: ${\displaystyle \displaystyle \phi _{i}(x)=\sin(\omega _{i}x)}$, ${\displaystyle \displaystyle \phi _{j}(x)=\sin(\omega _{j}x)}$, ${\displaystyle \displaystyle \omega _{i}={\frac {i\pi }{L}}}$, and ${\displaystyle \displaystyle \omega _{j}={\frac {j\pi }{L}}}$.

### Solution

The definition of a scalar product is:

 ${\displaystyle \langle {\bar {f}},{\bar {g}}\rangle :=\int _{0}^{L}{\bar {f}}(x)\ {\bar {g}}(x)\,dx}$ (1.1)

So, substituting the problem statement values into Eq. (1.0):

 ${\displaystyle \langle \phi _{i},\phi _{j}\rangle :=\int _{0}^{L}\sin(\omega _{i}x)\ \sin(\omega _{j}x)\,dx}$ (1.2)

and:

 ${\displaystyle \langle \phi _{j},\phi _{j}\rangle :=\int _{0}^{L}\sin(\omega _{j}x)\ \sin(\omega _{j}x)\,dx}$ (1.3)

Solving Eq. 1.2 first:

 ${\displaystyle \langle \phi _{i},\phi _{j}\rangle =\int _{0}^{L}\sin(\omega _{i}x)\ \sin(\omega _{j}x)\,dx}$ ${\displaystyle ={\frac {1}{2}}\int _{0}^{L}\cos((\omega _{i}-\omega _{j})x)-\cos((\omega _{i}+\omega _{j})x)\,dx}$ ${\displaystyle ={\frac {1}{2(\omega _{i}-\omega _{j})}}[\sin((\omega _{i}-\omega _{j})L)-\sin(0)]-{\frac {1}{2(\omega _{i}+\omega _{j})}}[\sin((\omega _{i}+\omega _{j})L)-\sin(0)]}$ ${\displaystyle ={\frac {1}{2L(i\pi -j\pi )}}\sin(i\pi -j\pi )-{\frac {1}{2L(i\pi +j\pi )}}\sin(i\pi +j\pi )}$

Because ${\displaystyle \displaystyle i}$ and ${\displaystyle \displaystyle j}$ are both integers, the sin function will always be a periodic integer varying by ${\displaystyle \displaystyle \pi }$, meaning that ${\displaystyle \sin(i\pi -j\pi )=0}$ and ${\displaystyle \sin(i\pi +j\pi )=0}$. Thus proving:

 ${\displaystyle \langle \phi _{i},\phi _{j}\rangle =0\ {\text{ for }}\ i\neq j}$ (1.0.a)

Now solving for Eq. 1.3:

 ${\displaystyle \langle \phi _{j},\phi _{j}\rangle =\int _{0}^{L}\sin(\omega _{j}x)\ \sin(\omega _{j}x)\,dx}$ ${\displaystyle ={\frac {1}{2}}\int _{0}^{L}\cos((\omega _{j}-\omega _{j})x)-\cos((\omega _{j}+\omega _{j})x)\,dx}$ ${\displaystyle ={\frac {1}{2}}\int _{0}^{L}\cos((j\pi -j\pi ){\frac {x}{L}})-\cos((j\pi +j\pi ){\frac {x}{L}})\,dx}$ ${\displaystyle ={\frac {1}{2}}\int _{0}^{L}\cos(0)-\cos({\frac {2jx\pi }{L}})\,dx}$ ${\displaystyle ={\frac {1}{2}}\int _{0}^{L}1-\cos({\frac {2jx\pi }{L}})\,dx}$ ${\displaystyle ={\frac {L}{2}}-{\frac {L}{2j\pi }}\sin(2j\pi )}$

Again, because ${\displaystyle \displaystyle j}$ is an integer, the sin function will always be a periodic integer varying by ${\displaystyle \displaystyle 2j\pi }$, meaning that ${\displaystyle \sin(2j\pi )=0}$. Thus proving:

 ${\displaystyle \langle \phi _{j},\phi _{j}\rangle ={\frac {L}{2}}\ {\text{ for }}\ i=j}$ (1.0.b)

### Author

Solved and Typed By ---Egm4313.s12.team1.durrance (talk) 16:49, 24 April 2012 (UTC)
Reviewed By - Egm4313.s12.team1.armanious (talk) 23:48, 24 April 2012 (UTC)

## Problem R7.2: Truncated Series

### Statement

Plot the truncated-series (3) p19-12 with n=5, and for:

 ${\displaystyle \displaystyle t=\alpha p_{1}=\alpha {\frac {2\pi }{c\omega _{1}}}=\alpha {\frac {2L}{c}}}$ (2.0)
 ${\displaystyle \displaystyle \alpha =.5,1,1.5,2}$ (2.1)

### Solution

Let it be stated first that (3) p.19-12 is equal to:

 ${\displaystyle \displaystyle u(x,t)=\sum {j=1}{n}a_{j}cos(c\omega _{j}t)sin(\omega _{j}x)}$ (2.2)

And in this series representation, c=3, L=2, and ${\displaystyle a_{j}}$. is equaled to this:

 ${\displaystyle \displaystyle a_{j}=\left\{{\begin{matrix}0forj=2m(even)\\-4/(\pi ^{3}j^{3})forj=2m+1(odd)\end{matrix}}\right.}$ (2.3)

With this in mind, we are prepared to create these truncated-series.
For ${\displaystyle \alpha =.5}$

 ${\displaystyle \displaystyle u(x,t)=[a_{1}cos(c\omega _{1}\alpha {\frac {2L}{c}})sin(\omega _{1}x)]}$ (2.4)
 ${\displaystyle \displaystyle +[a_{2}cos(c\omega _{2}\alpha {\frac {2L}{c}})sin(\omega _{2}x)]}$

 ${\displaystyle \displaystyle +[a_{3}cos(c\omega _{3}\alpha {\frac {2L}{c}})sin(\omega _{3}x)]}$

 ${\displaystyle \displaystyle +[a_{4}cos(c\omega _{4}\alpha {\frac {2L}{c}})sin(\omega _{4}x)]}$

 ${\displaystyle \displaystyle +[a_{5}cos(c\omega _{5}\alpha {\frac {2L}{c}})sin(\omega _{5}x)]}$

These simplify below as shown, after plugging in 3 for c, 10, for L, .5 for alpha, and the value of ${\displaystyle a_{j}}$ as determined from (2.2).

 ${\displaystyle \displaystyle u(x,t)=[{\frac {-4}{\pi ^{3}}}cos(\omega _{1}(.5)(2*10))sin(\omega _{1}x)]}$ (2.5)
 ${\displaystyle \displaystyle +[{\frac {-4}{\pi ^{3}*3^{3}}}cos(\omega _{3}(.5)(2*10))sin(\omega _{3}x)]}$
 ${\displaystyle \displaystyle +[{\frac {-4}{\pi ^{3}*5^{3}}}cos(\omega _{5}(.5)(2*10))sin(\omega _{5}x)]}$

Making ${\displaystyle \omega }$ equal to ${\displaystyle 2\pi }$, the graph appears as shown below.

Alpha = .5

For ${\displaystyle \alpha =1}$

These simplify below as shown, after plugging in 3 for c, 10, for L, 1 for alpha, and the value of ${\displaystyle a_{j}}$ as determined from (2.2).

 ${\displaystyle \displaystyle u(x,t)=[{\frac {-4}{\pi ^{3}}}cos(\omega _{1}(1)(2*10))sin(\omega _{1}x)]}$ (2.6)
 ${\displaystyle \displaystyle +[{\frac {-4}{\pi ^{3}*3^{3}}}cos(\omega _{3}(1)(2*10))sin(\omega _{3}x)]}$
 ${\displaystyle \displaystyle +[{\frac {-4}{\pi ^{3}*5^{3}}}cos(\omega _{5}(1)(2*10))sin(\omega _{5}x)]}$

Making ${\displaystyle \omega }$ equal to ${\displaystyle 2\pi }$, the graph appears as shown below.

Alpha = 1

For ${\displaystyle \alpha =1.5}$

These simplify below as shown, after plugging in 3 for c, 10, for L, 1.5 for alpha, and the value of ${\displaystyle a_{j}}$ as determined from (2.2).

 ${\displaystyle \displaystyle u(x,t)=[{\frac {-4}{\pi ^{3}}}cos(\omega _{1}(1.5)(2*10))sin(\omega _{1}x)]}$ (2.7)
 ${\displaystyle \displaystyle +[{\frac {-4}{\pi ^{3}*3^{3}}}cos(\omega _{3}(1.5)(2*10))sin(\omega _{3}x)]}$
 ${\displaystyle \displaystyle +[{\frac {-4}{\pi ^{3}*5^{3}}}cos(\omega _{5}(1.5)(2*10))sin(\omega _{5}x)]}$

Making ${\displaystyle \omega }$ equal to ${\displaystyle 2\pi }$, the graph appears as shown below.

Alpha = 1.5

For ${\displaystyle \alpha =2}$

These simplify below as shown, after plugging in 3 for c, 10, for L, 2 for alpha, and the value of ${\displaystyle a_{j}}$ as determined from (2.2).

 ${\displaystyle \displaystyle u(x,t)=[{\frac {-4}{\pi ^{3}}}cos(\omega _{1}(2)(2*10))sin(\omega _{1}x)]}$ (2.8)
 ${\displaystyle \displaystyle +[{\frac {-4}{\pi ^{3}*3^{3}}}cos(\omega _{3}(2)(2*10))sin(\omega _{3}x)]}$
 ${\displaystyle \displaystyle +[{\frac {-4}{\pi ^{3}*5^{3}}}cos(\omega _{5}(2)(2*10))sin(\omega _{5}x)]}$

Making ${\displaystyle \omega }$ equal to ${\displaystyle 2\pi }$, the graph appears as shown below.

Alpha = 2

### Author

Solved and Typed By - Egm4313.s12.team1.silvestri (talk) 19:01, 23 April 2012 (UTC)

Reviewed By - Egm4313.s12.team1.armanious (talk) 19:40, 25 April 2012 (UTC)

## Problem R7.3 Scalar Product, Magnitude, and Angles of Functions

### Statement

Find the scalar product <f,g>, the magnitude of f and g, and the angle between f and g for (see R7.3 Lect. 11-1 pg. 8):

1) ${\displaystyle f(x)=\cos x,g(x)=x,{\text{for}}-2\leq x\leq 10\!}$
2) ${\displaystyle f(x)={\frac {1}{2}}(3x^{2}-1),g(x)={\frac {1}{2}}(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:

 ${\displaystyle \displaystyle :=\int _{a}^{b}f(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:

 ${\displaystyle \displaystyle ||f||:=^{1/2}=\left[\int _{a}^{b}f^{2}(x)dx\right]^{1/2}}$ (3.1)

The cosine of the angle between two functions can be found in the following way:

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

Note that these equations are very similar to their vector counterparts.
Part 1

 ${\displaystyle \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):

 ${\displaystyle \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:

 ${\displaystyle \displaystyle (10\sin 10+\cos 10)-(-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:

 ${\displaystyle \displaystyle =\int _{-2}^{10}\cos ^{2}(x)dx=\int _{-2}^{10}\left({\frac {1}{2}}\cos(2x)+{\frac {1}{2}}\right)dx=\left[{\frac {1}{4}}\sin(2x)+{\frac {1}{2}}x\right]_{-2}^{10}}$ (3.6)

Solving this yields:

 ${\displaystyle \displaystyle \left[{\frac {1}{4}}\sin(2x)+{\frac {1}{2}}x\right]_{-2}^{10}=\left({\frac {1}{4}}\sin(20)+5\right)-\left({\frac {1}{4}}\sin(-4)-1\right)=6.04}$ (3.7)

Therefore the magnitude of f is found to be:

 ${\displaystyle \displaystyle ||f||=^{1/2}={\sqrt {6.04}}=2.46}$ (3.8)

A similar approach can be taken for the magnitude of g:

 ${\displaystyle \displaystyle =\int _{-2}^{10}x^{2}dx=\left[{\frac {x^{3}}{3}}\right]_{-2}^{10}}$ (3.9)
 ${\displaystyle \displaystyle \left[{\frac {x^{3}}{3}}\right]_{-2}^{10}={\frac {1000}{3}}-{\frac {-8}{3}}={\frac {1008}{3}}=336}$ (3.10)
 ${\displaystyle \displaystyle ||g||=^{1/2}={\sqrt {336}}=18.33}$ (3.11)

Using the above information with (3.2), the cosine of the angle between f and g is found to be

 ${\displaystyle \displaystyle \cos \theta ={\frac {}{||f||||g||}}={\frac {-7.68}{(2.46)(18.33)}}=-0.1705}$ (3.12)

Therefore, the angle between the functions f and g is

 ${\displaystyle \displaystyle \theta =\cos ^{-1}(-0.1705)=1.74rad=99.8^{\circ }}$ (3.13)

Part 2

 ${\displaystyle \displaystyle f(x)={\frac {1}{2}}(3x^{2}-1),g(x)={\frac {1}{2}}(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):

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

Solving this yields the scalar product:

 ${\displaystyle \displaystyle {\frac {1}{4}}\left[{\frac {5}{2}}x^{6}-{\frac {7}{2}}x^{4}+{\frac {3}{2}}x^{2}\right]_{-1}^{1}={\frac {1}{4}}\left({\frac {1}{2}}-{\frac {1}{2}}\right)=0}$ (3.16)

To find the magnitude of f, the scalar product of f with itself must first be found:

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

Solving this yields:

 ${\displaystyle \displaystyle {\frac {1}{4}}\left[\left({\frac {9}{5}}-2+1\right)-\left(-{\frac {9}{5}}+2-1\right)\right]={\frac {1}{4}}\left({\frac {4}{5}}+{\frac {4}{5}}\right)={\frac {2}{5}}}$ (3.18)

Therefore the magnitude of f is found to be:

 ${\displaystyle \displaystyle ||f||=^{1/2}={\sqrt {0.4}}=0.632}$ (3.19)

A similar approach can be taken for the magnitude of g:

 ${\displaystyle \displaystyle =\int _{-1}^{1}\left({\frac {1}{2}}\left(5x^{3}-3x\right)\right)^{2}dx={\frac {1}{4}}\int _{-1}^{1}\left(25x^{6}-15x^{4}+9x^{2}\right)dx={\frac {1}{4}}\left[{\frac {25}{7}}x^{7}-3x^{5}+3x^{3}\right]_{-1}^{1}}$ (3.20)
 ${\displaystyle \displaystyle {\frac {1}{2}}\left({\frac {25}{7}}-3+3\right)={\frac {25}{14}}}$ (3.21)
 ${\displaystyle \displaystyle ||g||=^{1/2}={\sqrt {\frac {25}{14}}}=1.336}$ (3.22)

Using the above information with (3.2), the cosine of the angle between f and g is found to be

 ${\displaystyle \displaystyle \cos \theta ={\frac {}{||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:

 ${\displaystyle \displaystyle \theta ={\frac {\pi }{2}}rad=90^{\circ }}$ (3.24)

### Author

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

Reviewed By - --Egm4313.s12.team1.stewart (talk) 02:22, 25 April 2012 (UTC)

## Problem R7.4 The Fourier Series and Plotted Functions

### Statement

From Lecture 11 Pg. 8 Do K 2011 p.482 pb.6,9,12,13. Problems 6 and 12 ask to graph the function and the Fourier series of the function below (4.1).

 ${\displaystyle \displaystyle f(x)=\left|x\right|}$ (4.1)

Problems 9 and 13 ask to graph the function and Fourier series of the function below (4.2).

 ${\displaystyle \displaystyle f(x)={\begin{Bmatrix}x\;\;if\;-\pi (4.2)

### Solution

For Question number 6, plotted using Wolfram Alpha.

The Function 4.1

For Question number 9, plotted using Matlab.

The Function 4.2

Question 12 asks for the Fourier series of equation 4.1, ${\displaystyle f(x)=\left|x\right|\!}$ which is an even function because ${\displaystyle f(-x)=+f(x)\!}$, and because it is even ${\displaystyle b_{n}=0\!}$. So the Fourier looks like this:

 ${\displaystyle \displaystyle f(x)=a_{0}+\sum _{n=1}^{\infty }a_{n}cos{\frac {n\pi x}{L}}}$ (4.3)

In which ${\displaystyle L=\pi \!}$ and:

 ${\displaystyle \displaystyle a_{0}={\frac {1}{2\pi }}\int _{-\pi }^{0}-xdx+{\frac {1}{2\pi }}\int _{0}^{\pi }xdx}$ (4.4)
 ${\displaystyle \displaystyle a_{n}={\frac {1}{\pi }}\int _{-\pi }^{\pi }f(x)cos(nx)dx}$ (4.5)
 ${\displaystyle \displaystyle b_{n}={\frac {1}{\pi }}\int _{-\pi }^{\pi }f(x)sin(nx)dx=0}$ (4.6)

These simplify to:

 ${\displaystyle \displaystyle a_{0}={\frac {1}{2\pi }}{\frac {\pi ^{2}}{2}}+{\frac {1}{2\pi }}{\frac {\pi ^{2}}{2}}={\frac {\pi }{2}}}$ (4.7)
 ${\displaystyle \displaystyle a_{n}={\frac {1}{\pi }}\int _{-\pi }^{0}-xcos(nx)dx+{\frac {1}{\pi }}\int _{-\pi }^{0}xcos(nx)dx}$ (4.8)
 ${\displaystyle \displaystyle a_{n}={\frac {-4}{n^{2}\pi }}}$ (4.9)
 ${\displaystyle \displaystyle f(x)={\frac {\pi }{2}}+\sum _{n-1}^{\infty }{\frac {4}{n^{2}\pi }}cos{\frac {n\pi x}{L}}}$ (4.10)

 ${\displaystyle \displaystyle f(x)={\frac {\pi }{2}}-{\frac {4}{\pi }}(cosx+{\frac {cos3x}{9}}+{\frac {cos5x}{25}}+...)}$ (4.11)

Plotted with Wolfram Aplpha

Fourier Series of Function 4.1

Now the Fourier series of equation 4.2, we need to divide the function into two parts. First let's evaluate ${\displaystyle f(x)=x\;if\;-\pi , which is an odd function because ${\displaystyle f(-x)=-f(x)\!}$. For an odd function ${\displaystyle a_{0}=a_{n}=0\!}$ so:

 ${\displaystyle \displaystyle f(x)=\sum \limits _{n=1}^{\infty }{\left[{{b}_{n}}\sin({\frac {n\pi x}{L}})\right]}=\sum \limits _{n=1}^{\infty }{\left[{{b}_{n}}\sin(nx)\right]}}$ (4.12)
 ${\displaystyle \displaystyle b_{n}={\frac {1}{\pi }}\int _{-\pi }^{0}xsin(nx)={\frac {1}{\pi }}[{\frac {sin(nx)-nxcos(nx)}{n^{2}}}]={\frac {-cos(-\pi n)}{n}}}$ (4.13)

Which simplifies to:

 ${\displaystyle \displaystyle b_{n}=[1,{\frac {-1}{2}},{\frac {1}{3}},{\frac {-1}{4}},{\frac {1}{5}},{\frac {-1}{6}}...]}$ (4.14)

The Fourier Series for just the top part of equation 4.2

 ${\displaystyle \displaystyle f(x)=sinx-{\frac {sin2x}{2}}+{\frac {sin3x}{3}}-{\frac {sin4x}{4}}+{\frac {sin5x}{5}}...}$ (4.15)

Now the bottom part of equation 4.2 is neither even nor odd so we must add all the components and at the end combine the solution with the Fourier series for the top part of equation 4.2

 ${\displaystyle \displaystyle f(x)=a_{0}+\sum _{n=1}^{\infty }a_{n}cos({\frac {n\pi x}{L}})+\sum _{n=1}^{\infty }b_{n}sin({\frac {n\pi x}{L}})=a_{0}+\sum _{n=1}^{\infty }a_{n}cos(nx)+\sum _{n=1}^{\infty }b_{n}sin(nx)}$ (4.16)
 ${\displaystyle \displaystyle a_{0}={\frac {1}{2\pi }}\int _{0}^{\pi }(\pi -x)dx={\frac {1}{2\pi }}[\pi x-{\frac {x^{2}}{2}}]={\frac {\pi }{4}}}$ (4.17)
 ${\displaystyle \displaystyle a_{n}={\frac {1}{\pi }}\int _{0}^{\pi }(\pi -x)cos(nx)dx={\frac {1}{\pi }}[{\frac {n(\pi -x)sin(nx)-cos(nx)}{n^{2}}}]={\frac {1-cos(\pi n)}{\pi n^{2}}}}$ (4.18)
 ${\displaystyle \displaystyle a_{n}=[{\frac {2}{\pi }},0,{\frac {2}{6\pi }},0,{\frac {2}{25\pi }},0,{\frac {2}{49\pi }}...]}$ (4.19)
 ${\displaystyle \displaystyle b_{n}={\frac {1}{\pi }}\int _{0}^{\pi }(\pi -x)sin(nx)dx={\frac {1}{\pi }}[{\frac {sin(nx)+n(\pi -x)cos(nx)}{n^{2}}}]={\frac {1}{n}}}$ (4.20)
 ${\displaystyle \displaystyle b_{n}=[1,{\frac {1}{2}},{\frac {1}{3}},{\frac {1}{4}},{\frac {1}{5}},{\frac {1}{6}}...]}$ (4.21)

The Fourier Series of ${\displaystyle f(x)=\pi -x\;if\;0.

 ${\displaystyle \displaystyle f(x)=a_{0}+\sum _{n=1}^{\infty }a_{n}cos(nx)+\sum _{n=1}^{\infty }b_{n}sin(nx)={\frac {\pi }{4}}+[{\frac {2cosx}{\pi }}+{\frac {2cos3x}{6\pi }}+{\frac {2cos5x}{25\pi }}...]+[1+{\frac {sinx}{2}}+{\frac {sin2x}{3}}+{\frac {sin3x}{4}}+{\frac {sin4x}{5}}+{\frac {sin5x}{6}}...]}$ (4.22)

Combining with the Fourier Series of ${\displaystyle f(x)=x\;if\;-\pi :

 ${\displaystyle \displaystyle f(x)={\frac {\pi }{4}}+[{\frac {2cosx}{\pi }}+{\frac {2cos3x}{6\pi }}+{\frac {2cos5x}{25\pi }}...]+[sinx+{\frac {sin2x}{2}}+{\frac {sin3x}{3}}+{\frac {sin4x}{4}}+{\frac {sin5x}{5}}+...]+[sinx-{\frac {sin2x}{2}}+{\frac {sin3x}{3}}-{\frac {sin4x}{4}}+{\frac {sin5x}{5}}...]}$ (4.23)

The total series and final answer:

 ${\displaystyle \displaystyle f(x)={\frac {\pi }{4}}+[{\frac {2cosx}{\pi }}+{\frac {2cos3x}{6\pi }}+{\frac {2cos5x}{25\pi }}...]+[2sinx+{\frac {2sin3x}{3}}+{\frac {2sin5x}{5}}...]}$ (4.24)

Plotted with Wolfram Alpha

Fourier Series of Function 4.2

### Author

Solved and Typed By - --Egm4313.s12.team1.stewart (talk) 02:22, 25 April 2012 (UTC)

Reviewed By - Egm4313.s12.team1.essenwein (talk) 16:50, 25 April 2012 (UTC)

## Problem R7.5 Approximation by Trigonometric Series

### Statement

Consider equation (5.0) below:

 ${\displaystyle \displaystyle <\phi _{2j-1},\phi _{2k-1}>=\int _{0}^{P}\sin {j\omega x}\cdot \sin {k\omega x}dx=0}$ (5.0)

1) Find the exact integration of equation (5.0) with ${\displaystyle P=2\pi \!}$, ${\displaystyle j=2\!}$, ${\displaystyle k=3\!}$.
2) Confirm the result with Matlab's trapz command for the trapezoidal rule.

### Solution

1) Substituting the given values, we get equation (5.1) below:

 ${\displaystyle \displaystyle <\phi _{3},\phi _{5}>=\int _{0}^{2\pi }\sin {2\omega x}\cdot \sin {3\omega x}dx=0}$ (5.1)

Using the product and sum trigonometry identities, we can evaluate the definite integral:

 ${\displaystyle \displaystyle \int _{0}^{2\pi }\sin {2\omega x}\cdot \sin {3\omega x}dx={\frac {1}{2}}\int _{0}^{2\pi }(\cos {\omega x}-\cos {5\omega x})dx=0}$ (5.2)
 ${\displaystyle \displaystyle \rightarrow [{\frac {1}{2\omega }}{\sin {\omega x}-{\frac {1}{5}}\sin {5\omega x}}]_{0}^{2\pi }=0}$ (5.3)

Also, ${\displaystyle \omega ={\frac {2\pi }{P}}=1\!}$, and substituting this into equation (5.3) allows the definite integral to be solved:

 ${\displaystyle \displaystyle [{\frac {1}{2}}{\sin {x}-{\frac {1}{5}}\sin {5x}}]_{0}^{2\pi }=0}$ (5.4)

2) The following is the code for evaluating the definite integral in equation (5.1) in Matlab:

EDU>> X = 0:pi/100:2*pi;
EDU>> Y = sin(2*X).*sin(3*X);
EDU>> Z = trapz(X,Y)

Z =

 -2.2633e-17


EDU>> plot(X,Y)

The returned value of the evaluated integral in Matlab is essentially equal to zero, and it can be seen in the graph that the areas under the curve cancel each other out.

### Author

Solved and Typed By - Egm4313.s12.team1.wyattling

Reviewed By - Egm4313.s12.team1.rosenberg

## Contributing Members

 Team Contribution Table Problem Number Lecture Assigned To Solved By Typed By Proofread By 7.1 R7.1 Lect. 19c-1 pg. 10 Jesse Durrance Jesse Durrance Jesse Durrance George Armanious 7.2 R7.2 Lect. 19c-1 pg. 13 Emotion Silvestri Emotion Silvestri Emotion Silvestri George Armanious 7.3 R7.3 Lect. 11-1 pg. 8 George Armanious George Armanious George Armanious Chris Stewart 7.4 R7.4 Lect. 11-1 pg.8 Chris Stewart Chris Stewart Chris Stewart Eric Essenwein 7.5 R7.5 Lect. 12-1 pg. 8 Wyatt Ling Wyatt Ling Wyatt Ling Steven Rosenberg