Egm4313.s12.teamboss/R7

From Wikiversity
Jump to: navigation, search

Contents

Report 7 [edit]

Toc.JPG

Problem R7.1: Determining Orthogonality [edit]

Statement [edit]

Determine orthogonality of:


\langle \phi_i , \phi_j \rangle = 0 \ \text{ for } \ i \ne j

\langle \phi_j , \phi_j \rangle = \frac{L}{2} \ \text{ for } \ i=j

(1.0)



Where: \displaystyle \phi_i (x) = \sin(\omega_i x), \displaystyle \phi_j (x) = \sin(\omega_j x), \displaystyle \omega_i = \frac{i \pi}{L}, and \displaystyle \omega_j = \frac{j \pi}{L}.

Solution [edit]

The definition of a scalar product is:


\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):


\langle \phi_i , \phi_j \rangle := \int_0^L \sin(\omega_i x) \ \sin(\omega_j x) \, dx

(1.2)


and:


\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:


\langle \phi_i , \phi_j \rangle = \int_0^L \sin(\omega_i x) \ \sin(\omega_j x) \, dx

= \frac {1}{2} \int_0^L \cos((\omega_i - \omega_j)x)-\cos((\omega_i+\omega_j)x) \, dx

= \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)]

= \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 i and \displaystyle j are both integers, the sin function will always be a periodic integer varying by \displaystyle \pi, meaning that \sin(i \pi - j \pi)=0 and \sin(i \pi + j \pi)=0. Thus proving:


\langle \phi_i , \phi_j \rangle = 0 \ \text{ for } \ i \ne j

(1.0.a)



Now solving for Eq. 1.3:


\langle \phi_j , \phi_j \rangle = \int_0^L \sin(\omega_j x) \ \sin(\omega_j x) \, dx

= \frac {1}{2} \int_0^L \cos((\omega_j - \omega_j)x)-\cos((\omega_j+\omega_j)x) \, dx

= \frac {1}{2} \int_0^L \cos((j \pi - j \pi)\frac{x}{L})-\cos((j \pi+j \pi)\frac {x}{L}) \, dx

= \frac {1}{2} \int_0^L \cos(0)-\cos(\frac {2jx \pi}{L}) \, dx

= \frac {1}{2} \int_0^L 1-\cos(\frac {2jx \pi}{L}) \, dx

= \frac {L}{2}-\frac {L}{2j \pi}\sin(2j \pi)



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


\langle \phi_j , \phi_j \rangle = \frac{L}{2} \ \text{ for } \ i=j

(1.0.b)


Author [edit]

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 [edit]

Statement [edit]

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

\displaystyle
t=\alpha p_1 = \alpha \frac{2\pi}{c \omega_1} = \alpha \frac {2L}{c}

(2.0)


\displaystyle
\alpha = .5, 1, 1.5, 2

(2.1)


Solution [edit]

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

\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  a_j . is equaled to this:

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

(2.3)


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

\displaystyle
u(x,t) = [a_1 cos(c \omega _1 \alpha \frac{2L}{c})sin(\omega _1 x)]

(2.4)

\displaystyle
+[a_2 cos(c \omega _2 \alpha \frac{2L}{c})sin(\omega _2 x)]


\displaystyle
+[a_3 cos(c \omega _3 \alpha \frac{2L}{c})sin(\omega _3 x)]


\displaystyle
+ [a_4 cos(c \omega _4 \alpha \frac{2L}{c})sin(\omega _4 x)]


\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  a_j as determined from (2.2).

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

(2.5)

\displaystyle
+[\frac{-4}{\pi ^3 * 3^3}cos(\omega _3 (.5)(2*10))sin(\omega _3 x)]


\displaystyle
+[\frac{-4}{\pi ^3 * 5^3}cos(\omega _5 (.5)(2*10))sin(\omega _5 x)]


Making  \omega equal to  2 \pi , the graph appears as shown below.

Alpha = .5


For  \alpha =1

These simplify below as shown, after plugging in 3 for c, 10, for L, 1 for alpha, and the value of  a_j as determined from (2.2).

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

(2.6)

\displaystyle
+[\frac{-4}{\pi ^3 * 3^3}cos(\omega _3 (1)(2*10))sin(\omega _3 x)]


\displaystyle
+[\frac{-4}{\pi ^3 * 5^3}cos(\omega _5 (1)(2*10))sin(\omega _5 x)]


Making  \omega equal to  2 \pi , the graph appears as shown below.

Alpha = 1


For  \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  a_j as determined from (2.2).

\displaystyle
u(x,t) = [\frac{-4}{\pi ^3} cos(\omega _1 (1.5) (2*10))sin(\omega _1 x)]

(2.7)

\displaystyle
+[\frac{-4}{\pi ^3 * 3^3}cos(\omega _3 (1.5)(2*10))sin(\omega _3 x)]


\displaystyle
+[\frac{-4}{\pi ^3 * 5^3}cos(\omega _5 (1.5)(2*10))sin(\omega _5 x)]


Making  \omega equal to  2 \pi , the graph appears as shown below.

Alpha = 1.5


For  \alpha =2

These simplify below as shown, after plugging in 3 for c, 10, for L, 2 for alpha, and the value of  a_j as determined from (2.2).

\displaystyle
u(x,t) = [\frac{-4}{\pi ^3} cos(\omega _1 (2) (2*10))sin(\omega _1 x)]

(2.8)

\displaystyle
+[\frac{-4}{\pi ^3 * 3^3}cos(\omega _3 (2)(2*10))sin(\omega _3 x)]


\displaystyle
+[\frac{-4}{\pi ^3 * 5^3}cos(\omega _5 (2)(2*10))sin(\omega _5 x)]



Making  \omega equal to  2 \pi , the graph appears as shown below.

Alpha = 2


Author [edit]

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 [edit]

Statement [edit]

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) 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 [edit]

The scalar product, the function equivalent of the vector dot product, of two functions can be found in the following way:


   \displaystyle 
 <f,g>:=\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:


   \displaystyle 
 ||f||:=<f,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:


   \displaystyle 
 \cos \theta = \frac{<f,g>}{||f||||g||}

(3.2)

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


   \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 
 <f,g>=\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 
 (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:


   \displaystyle 
<f,f>=\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:


   \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:


   \displaystyle 
||f||=<f,f>^{1/2}=\sqrt{6.04}=2.46

(3.8)

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


   \displaystyle 
<g,g>=\int_{-2}^{10}x^2dx=\left [ \frac{x^3}{3} \right ]_{-2}^{10}

(3.9)


   \displaystyle 
\left [ \frac{x^3}{3} \right ]_{-2}^{10}=\frac{1000}3-\frac{-8}{3}=\frac{1008}{3}=336

(3.10)


   \displaystyle 
||g||=<g,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 
\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


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

(3.13)

Part 2


   \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):


   \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:


   \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:


   \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:


   \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:


   \displaystyle 
||f||=<f,f>^{1/2}=\sqrt{0.4}=0.632

(3.19)

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


   \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)


   \displaystyle 
\frac12 \left (\frac{25}{7}-3+3  \right ) =\frac{25}{14}

(3.21)


   \displaystyle 
||g||=<g,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 
\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:


   \displaystyle 
\theta =\frac{\pi}{2}rad=90^{\circ}

(3.24)

Author [edit]

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 [edit]

Statement [edit]

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 
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 
f(x)=\begin{Bmatrix}
x\;\; if \; -\pi <x<0\\ 
\pi -x\;\; if \; 0<x<\pi 
\end{Bmatrix}

(4.2)

Solution [edit]

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, f(x)=\left | x \right |\! which is an even function because f(-x)=+f(x)\!, and because it is even b_{n}=0\!. So the Fourier looks like this:


   \displaystyle 
f(x)=a_0+\sum_{n=1}^{\infty}a_ncos\frac{n\pi x}{L}

(4.3)

In which L= \pi \! and:


   \displaystyle 
a_0=\frac{1}{2\pi}\int_{-\pi}^{0}-xdx+\frac{1}{2\pi}\int_{0}^{\pi}xdx

(4.4)


   \displaystyle 
a_{n}=\frac{1}{\pi }\int_{-\pi}^{\pi}f(x)cos(nx)dx

(4.5)


   \displaystyle 
b_{n}=\frac{1}{\pi }\int_{-\pi}^{\pi}f(x)sin(nx)dx=0

(4.6)


These simplify to:



   \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 
a_n=\frac{1}{\pi}\int_{-\pi}^{0}-xcos(nx)dx+\frac{1}{\pi}\int_{-\pi}^{0}xcos(nx)dx

(4.8)


   \displaystyle 
a_n=\frac{-4}{n^{2}\pi}

(4.9)


   \displaystyle 
f(x)=\frac{\pi}{2}+\sum_{n-1}^{\infty }\frac{4}{n^{2}\pi}cos\frac{n\pi x}{L}

(4.10)

The final answer:


   \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 f(x)=x\; if\; - \pi <x<0 \!, which is an odd function because f(-x)=-f(x)\!. For an odd function a_{0}=a_{n}=0\! so:

\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 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 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 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 
f(x)=a_{0}+\sum_{n=1}^{\infty }a_ncos(\frac{n \pi x}{L})+\sum_{n=1}^{\infty }b_nsin(\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 
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 
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 
a_{n}=[\frac{2}{\pi},0,\frac{2}{6\pi},0,\frac{2}{25\pi},0,\frac{2}{49 \pi}...]

(4.19)


   \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 
b_{n}=[1,\frac{1}{2},\frac{1}{3},\frac{1}{4},\frac{1}{5},\frac{1}{6}...]

(4.21)

The Fourier Series of f(x)= \pi -x\; if\;  0<x< \pi \!.


   \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 f(x)= x\; if\;  -\pi <x<0 \!:


   \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 
 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 [edit]

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 [edit]

Statement [edit]

Consider equation (5.0) below:


   \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  P = 2\pi\!,  j = 2\!,  k = 3\!.
2) Confirm the result with Matlab's trapz command for the trapezoidal rule.

Solution [edit]

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


   \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 
 \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 
 \rightarrow [\frac{1}{2\omega}{\sin{\omega x} - \frac{1}{5}\sin{5\omega x}}]_0^{2\pi} = 0

(5.3)

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


   \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)
Graph7.5.png

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 [edit]

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




Contributing Members [edit]

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

Example.jpg