Jump to content

University of Florida/Egm4313/s12.team1/R6

From Wikiversity

Report 6

Problem R6.1

[edit | edit source]

Statement

[edit | edit source]

Find the (smallest) period of and .
Show that these functions also have period .
Show that the constant is also a periodic function with period .

Solution

[edit | edit source]

First, we identify the property of periodic functions, as shown on p9-2 of the notes, equation (1)

(1.0)


So for , the following determines the smallest period.

(1.1)


We then add to see a final expression that will be equal to

(1.2)


We then pull out a term that leaves an x plus a number (our period) inside the trigonometric function, cosine.

(1.3)


This means the smallest period is .

For , the following determines the smallest period.

(1.4)


We then add to see a final expression that will be equal to

(1.5)


We then pull out a term that leaves an x plus a number (our period) inside the trigonometric function, cosine.

(1.6)


This means the smallest period is , just as for its cosine equivalent.


From the notes (page 9-5, (1)), it can be stated that where is the period. Both of these functions have as their period. If we put in 1 for n, and for , the period simplifies to simply .

As for the constant , a constant is, almost by definition, a periodic function. The property of periodic functions as referenced in (1.0) supports this.

(1.0)


For a function of f that is a constant, x is not a factor effecting its value. This means, no matter what is added to x, the function will return the same constant number. This added value can just as well be , and thus, is a periodic function with period .

Author

[edit | edit source]

Solved and Typed By -Egm4313.s12.team1.silvestri (talk) 02:19, 7 April 2012 (UTC)
Reviewed By - --Egm4313.s12.team1.rosenberg (talk) 01:19, 11 April 2012 (UTC)




Problem R6.2 Fourier Series Expansions for Odd and Even Functions

[edit | edit source]

Statement

[edit | edit source]

Kreyszig pg 491 pbs. 11,12
Is the given function odd or even or neither even nor odd? Show details of your work.


11)


12)
-----



Continued)Find the Fourier series expansion for on p.9-8 as follows:
1. Develop the Fourier series expansion of
Plot and the truncated Fourier series

dsfawf

for n=0,1. Observe the values of at the points of discontinuities, and the Gibbs phenomenon. Transform the variable so to obtain the Fourier series expansion of .
Hint: is an even function; what would become of the coefficients ?

2. Do the same as above, but using to obtain the Fourier series expansion of ; compare to the result obtained above.
Hint: Transform into an odd function, and expand this odd function into Fourier series; observe the coefficients of this series.

Solution

[edit | edit source]

Part 1: K 2011 p.491 pb. 11

(2.0)

The preceding function is an even function. Even functions are functions where . Odd functions on the other hand are functions where . The Fourier series of even and odd functions can be found more easily than the Fourier series of a function that is neither even nor odd. Normal Fourier series contain both sine and cosine terms. Because of the nature of even functions, the coefficient of all sine terms in their series is zero. Likewise, all cosine terms in odd functions have a coefficient of zero. Therefore its Fourier series expansion will be of the form:

(2.1)

Where:

(2.2)

And

(2.3)

To get the constant term of the expansion, equation (2.0) will be substituted into equation (2.2) with L=1:

(2.4)

To get the coefficients of the rest of the terms in the expansion, equation (2.0) will be substituted into equation (2.3) with L=1:

(2.5)

Simplifying, this yields:

(2.6)

Therefore, the Fourier expansion of f(x) is:

(2.7)

Part 2: K 2011 p.491 pb. 12

(2.8)

The preceding function is an even function. Therefore, equations (2.1)-(2.3) are applicable.
To get the constant term of the expansion, equation (2.8) will be substituted into equation (2.2) with L=1:

(2.9)

To get the coefficients of the rest of the terms in the expansion, equation (2.0) will be substituted into equation (2.3) with L=1:

(2.10)

Simplifying, this yields:

(2.11)

Therefore, the Fourier expansion of f(x) is:

(2.12)

Part 3 The Fourier series expansion of the function f(x) in Figure 1 can be found in one of two ways. The first way involves transforming x in the following way:

(2.13)

The resulting function is now an even function that alternates between the constant value A and zero and has period 4. Using the same methods used above, the Fourier series of the function can be found.
The constant coefficient of the series is found by:

(2.14)

Note that because the function is discontinuous at the midpoint, the integral must be split into two different integrals.
The coefficients of the cosine terms of the series can be found by:

(2.15)

Therefore, the Fourier series for the transformed function is:

(2.16)

Through a change in variables, the Fourier series of the original function, f(x), can be found:

(2.17)

The following figure shows a plot of with its truncated Fourier series for n=0,1.


Figure 2
Figure 3 shows the same plot with more values of n:


Note that all plots assume that A=1.
It should be noted that the accuracy of the expansion increases with an increase in the number of terms in the expansion. Also, there is strong fluctuation at points of discontinuity. These fluctuations are apparent even at high values of n, but they decrease in size and move closer to the points of discontinuity. This is a property of Fourier series known as the Gibbs phenomenon.
The other method of developing the Fourier series is to transform the function into an odd function. This can be done by transforming both the independent variable and overall function as follows:

(2.18)

(2.19)

An odd function has a Fourier series expansion of the form:

(2.20)

Where:

(2.21)

Applying this to the transformed function, with L=2:

(2.22)

The Fourier series is therefore:

(2.23)

(2.24)

(2.25)

The following figure shows a plot of with its truncated Fourier series for n=0,1.


Figure 4
Note that all plots assume A=1.
The accuracy of the expansion as shown on the plot is expected given the low number of terms used in the expansion. As Figure 3 shows, if the number of terms used to form the plot in Figure 4 is increased, the accuracy of the expansion will greatly increase (but more slowly at points of discontinuity because of the Gibbs phenomenon). This level of accuracy is shown in Figure 5, which contains the expansion to 100 and 200 terms.

Author

[edit | edit source]

Solved and Typed By - Egm4313.s12.team1.armanious (talk) 07:10, 11 April 2012 (UTC)
Reviewed By - Egm4313.s12.team1.silvestri (talk) 18:30, 11 April 2012 (UTC)




Problem R6.3 Finding Fourier Series for Odd and Even Functions

[edit | edit source]

Statement

[edit | edit source]

Kreyszig pg 491 pbs 15,17
Is the given function even or odd or neither even not odd? Find its Fourier series. Show details of your work.




Plot the truncated Fourier series for n=2,4,8

Solution

[edit | edit source]

By definition, a function, is even if , and its Fourier series reduces to a Fourier cosine series:

(3.0)


A function, is odd if , and its Fourier series reduces to a Fourier sine series:

(3.1)



15)

By inspection, it is evident that the given function in problem 15 is odd because for every value that is negative, is negative. Therefore, .

The following are the defining functions for the given graph:

(3.2)


Because the function is odd, we use equation (3.1) to develop the Fourier series, where the period is and equals :

(3.3)


Now we need to find , which is of the following form for odd functions:

(3.4)


(3.5)


(3.6)


Evaluating and simplifying the definite integral gives the following:

(3.7)


Evaluating equation (3.7) at

(3.8)


Thus:


(3.9)

Plots of truncated Fourier series:
n = 2:

n = 4:

n = 8:


17)

By inspection, it is evident that the given function in problem 17 is even because for every value that is negative, is positive. Therefore, .

The following are the defining functions for the given graph:

(3.10)


Because the function is even, we use equation (3.0) to develop the Fourier series, where the period is and :

(3.11)


Now we need to find using Euler's Formula:

(3.12)


(3.13)


(3.14)


Evaluating the definite integral in equation (3.14) yields :

(3.15)


Now we find using Euler's Formula:

(3.16)


(3.17)


(3.18)


Evaluating the definite integral in equation (3.18) yields the following equation for :

(3.19)


Evaluating equation (3.19) at yields:

(3.20)


Thus, the Fourier series is:


(3.21)

Plots of truncated Fourier series:
n = 2:

n = 4:

n = 8:

Author

[edit | edit source]

Solved and Typed By ---Egm4313.s12.team1.wyattling (talk) 06:19, 11 April 2012 (UTC)
Reviewed By -Egm4313.s12.team1.armanious (talk) 15:18, 11 April 2012 (UTC)




Problem R6.4 Fourier Series as an ODE Excitiation

[edit | edit source]

Statement

[edit | edit source]

Consider the L2-ODE-CC (5) p7b-7 with the window function f(x) p.9-8 as excitation:


(4.0)


and the initial conditions

(4.1)


1. Find such that:

(4.2)


with the same initial conditions (4.1).
Plot for n=2,4,8, for x in [0,10].
2.Use the matlab command ode45 to integrate the L2-ODE-CC, and plot the numerical solution to compare with the analytical solution. Level 1:n=0,1

Part 1 Solution

[edit | edit source]

First, we shift the excitation f(x) to the left by introducing a new independent variable, t. This allows the period to start at zero.

(4.3)


The piecewise representation of the window function is now (in terms of t) as follows:

for
for

(4.4)


To find the Fourier transform, the period of oscillation is determined:

(4.5)


And the frequency of oscillation:

(4.6)


The general form of a Fourier transform is

(4.7)


The following equations are given values of the constants in (4.7), evaluated for the function in (4.4):

(4.8)


(4.9)


(4.10)


In their simplest forms:

(4.11)


(4.12)


Plugging in r(x)=f(t) in (4.0),

(4.13)


From the general form, a particular solution to (4.13) and its derivatives are as follows:

(4.14)


(4.15)


(4.16)


By plugging in (4.14), (4.15), and (4.16) into (4.13), we find An and Bn in terms of another constant, Cn:

(4.17)


(4.18)


(4.19)


After substituting t with (4.3), the solutions are shown for n=2,4,8.

(4.20)


(4.21)


(4.22)


Part 2 Solution

[edit | edit source]

The excitation for n=0 and n=1 are the same, because .

The homogeneous solution to (4.0) is

(4.23)


For , the particular solution is

(4.24)


Evaluating, we find that



(4.25)


Thus, the complete solution is

(4.26)


Integrating using MATLAB's ode45 command, the following plot is obtained for y:

Author

[edit | edit source]

Solved and Typed By - Egm4313.s12.team1.essenwein (talk) 00:00, 11 April 2012 (UTC)
Reviewed By - --Egm4313.s12.team1.wyattling (talk) 14:02, 11 April 2012 (UTC)




Problem R6.5

[edit | edit source]

Statement

[edit | edit source]

Continuation of R4.2, R4.3, R4.4.
R4.2,p.7c-26:
For each value of n=3,5,9, redisplay the expressions for the 3 functions , and plot these 3 functions separately over the interval .
Exact solution:
Redisplay the expressions for
Superimpose each of the above plots with that of the exact solution.

R4.3,p.7c-28:
Level 1: Understand and run the TA's code to produce a similar plot, but over a larger interval [0,10]. Do zoom-in plots about points and comment on the accuracy of different approximations.
R4.4,p.7c-29:
Level 1: Understand and run the TA's code to produce a similar plot, but over a larger interval [0.9,10], and for n=4,7. Do zoom-in plots about x=1,1.5,2,2.5 and comments on the accuracy of the approximations.

Solution

[edit | edit source]

R4.2,p.7c-26

[edit | edit source]

This first part of the problem is to redo 4.2:

In order to find the overall solution for the L2-ODE-CC corresponding to the Taylor series expansion of the sine function, both the homogenous and particular solutions must be found. The homogenous equation can be found through this method:

(5.0)

(5.1)

(5.2)


Next, the excitation must be expanded to the desired n. The following shows the excitation expanded to n=3, 5, and 9:

(5.3)

(5.4)

(5.5)

Next, the particular solution must be found. The particular solution will be of the form:

(5.6)

Using the derivation discussed in R4.1, a matrix equation in the form Ak = d can be found, where k is the matrix containing the coefficients of the particular solution and d is the matrix containing the coefficients of each power of x in the expansion of the excitation. The general formula for A is:

(5.7)

n=3
The matrix A is found as:

(5.8)

Therefore, the matrix equation is:

(5.9)

(5.10)

Therefore the particular solution is:

(5.11)

And the overall solution for n=3 is:

(5.12)

Using the initial conditions:

&

(5.13)

Solving yields & . Therefore the overall solution is:

(5.14)

n=5
The matrix equation is:
Therefore the particular solution is:


(5.15)

And the overall solution for n=5 is:


(5.16)

Using the initial conditions:

Solving yields . Therefore the overall solution is:


(5.18)

n=9
The matrix equation is:


Therefore the particular solution is:



(5.19)

And the overall solution for n=9 is:



(5.20)

Using the initial conditions:

(5.21)

Solving yields . Therefore the overall solution is:




(5.22)


The following plot shows the overall solution of the ODE at n=3,5,9 over the domain [0,4π]: Figure 4.2-2

The near perfect overlap between all three graphs shows that the approximations converge quickly for very low values of n.

Next, the exact ODE will be calculated to find the accuracy of the above approximations. The homogeneous solution is the same as the homogeneous solution above, only with different coefficients. The particular solution will be in the form:

(5.23)

(5.24)

(5.25)

Plugging these values into the ODE:

(5.26)

Separating sine and cosine terms yield two linear equations which can be used to solve for the unknown coefficients:

&

(5.27)

Solving these equations yield K = 0.3 and M = 0.1.

(5.28)

Therefore the exact overall solution is:

(5.29)

(5.30)

Using the initial conditions yield the equations:

&

(5.31)

Solving these two equations yield . Therefore the exact overall solution is:

(5.32)

The following figure shows the plot of the exact solution over the plot in Fig. 4.2-2: Figure 4.2-3

R4.3,p.7c-28

[edit | edit source]

In this problem we are given the TA's Matlab code but must change the interval on which we are plotting. This give us the following code:

x=-1:0.01:1.5;
y=log(1+x);
x1=-1.5:0.01:1.5;
y1=zeros(1,301);
for i=1:4
for j=1:301
y1(j)=y1(j)-((-x1(j))^i)/i;
end
end
y2=zeros(1,301);
for i=1:7
for j=1:301
y2(j)=y2(j)-((-x1(j))^i)/i;
end
end
y3=zeros(1,301);
for i=1:11
for j=1:301
y3(j)=y3(j)-((-x1(j))^i)/i;
end
end
y4=zeros(1,301);
for i=1:16
for j=1:301
y4(j)=y4(j)-((-x1(j))^i)/i;
end
end
h=plot(x,y);
orange = [1 0.5 0.2];
set(h,'Color',orange);
hold on;
plot(x1,y1,'r');
plot(x1,y2,'g');
plot(x1,y3,'b');
plot(x1,y4,'c');
axis([0 10 -10 10]);
legend('log(1+x)','T_4','T_7','T_1_1','T_1_6');
grid on;

Zooming at -0.5

This graph shows fairly accurate results with slight deviation, with largest deviation occurring at the T4 term.

Zooming about point 0

In this graph, only T16 shows, thus meaning that it is the best approximation.

Zooming at 0.5

All lines appear to be fairly good approximations with the exception of T4 which deviates from the rest.

R4.4,p.7c-29

[edit | edit source]

Again we must adjust the TA's Matlab code:

syms x
f=log(x+1);
fT1=taylor(f,5,1);
fT2=taylor(f,8,1);
fT3=taylor(f,12,1);
X=.9:0.1:10;
Y(:,1)=subs(fT1,'x',X);
Y(:,2)=subs(fT2,'x',X);
Y(:,3)=subs(fT3,'x',X);
Y(:,4)=log(1+X);
figure
plot(X,Y);
axis([.9,10,-10,10]);


Zooming at 1

Since the three lines are all stacked, both n=4 and n=7 are good approximations at x=1.

Zooming at 1.5

Again, since the three lines are all stacked, both n=4 and n=7 are good approximations at x=1.5.

Zooming at 2

Here, both can again be said to be good approximations, however, you can see some very slight deviation in n=4.

Zooming at 2.5

In this plot, n=7 is still a pretty strong approximation, while n=4 is beginning to deviate at a fairly rapid rate and thus will soon be a poor approximation.

Author

[edit | edit source]

Solved and Typed By - --Egm4313.s12.team1.rosenberg (talk) 01:19, 11 April 2012 (UTC)
Reviewed By ---Egm4313.s12.team1.durrance (talk) 19:12, 11 April 2012 (UTC)




Problem R6.6 Simplifying a Particular Solution

[edit | edit source]

Statement

[edit | edit source]

Verify (2) p.10-7 as follows:
Given the ODE:

(6.1)

1)Simplify the 1st term on the lhs of (2) p.10-4.
2)Simplify the 2nd term , and combine with the simplified 1st term.
3)Finally, add the 3rd term
4)Find the final expression for

Solution

[edit | edit source]

From Lecture 10 Pg. 9

To find the particular solution of an ODE we can use the method of undetermined coefficients. In report 3 we used the table 2.1 below to find the standard form of the particular solution given the form of the excitation .

Table 2.1


So the general form of the particular solution is:

(6.2)

Task 1 asks to simplify they first term of the given ODE which is . This is done by taking the second derivative of and plugging it into equation 6.1

(6.3)

simplifies to:

(6.4)

Now we must do the same for the second term .

(6.5)

(6.6)

Add the second term to the first to continue building the original ODE (equation 6.1).

(6.7)


(6.8)

Finally add the third term to the other two to have the lhs of the ODE 6.1

(6.9)


(6.10)

(6.11)

This simplifies to the particular solution below:

(6.12)

Author

[edit | edit source]

Solved and Typed By ---Egm4313.s12.team1.stewart (talk) 23:50, 10 April 2012 (UTC)
Reviewed By - Egm4313.s12.team1.essenwein (talk) 18:12, 11 April 2012 (UTC)

Problem R6.7: Separated ODEs

[edit | edit source]

Statement

[edit | edit source]

Find the separated ODEs for the heat equation:

(7.0)


Where is the coefficient of heat conductivity.


Solution

[edit | edit source]

Assume:

(7.1)



So, by take partial derivatives of Eq. (7.1) with respect to the individual variables:

(7.2)



(7.3)



By substituting the partial derivatives back into Eq. (7.0):

(7.4)



Separating the equations to similar variables yields:

(7.4a)



Therefore the separated ODEs are:



(7.5)

Author

[edit | edit source]

Solved and Typed By - --Egm4313.s12.team1.durrance (talk) 02:13, 9 April 2012 (UTC)
Reviewed By - --Egm4313.s12.team1.stewart (talk) 23:48, 10 April 2012 (UTC)




Contributing Members

[edit | edit source]
Team Contribution Table
Problem Number Lecture Assigned To Solved By Typed By Proofread By
6.1 Sec. 9-1 p. 9-5 Emotion Silvestri Emotion Silvestri Emotion Silvestri Steven Rosenberg
6.2 Sec. 9-1 p. 9-8 George Armanious George Armanious George Armanious Emotion Silvestri
6.3 Lecture 9-1 Pg. 9-12 Wyatt Ling Wyatt Ling Wyatt Ling George Armanious
6.4 Sec. 9-1 p. 9-8 Eric Essenwein Eric Essenwein Eric Essenwein Wyatt Ling
6.5 Lecture 9-1 Pg. 28 Steven Rosenberg Steven Rosenberg Steven Rosenberg Jesse Durrance
6.6 Lecture 10 Pg. 9 Chris Stewart Chris Stewart Chris Stewart Eric Essenwein
6.7 Sec. 19a-1 p. 19-3 Jesse Durrance Jesse Durrance Jesse Durrance Chris Stewart