University of Florida/Egm4313/s12.team5.R6

Report 6

R 6.1 edit

Question edit

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

Solution edit

Given (1) p.9-2:   for all   and where p is the period.
The smallest period occurs when n=1 thus we can use the equation as:  

For   we have:
 
Thus,  
 
 
 

 , smallest period occurs when n=1 so,  



For   we have:
 < br /> Thus,  
 
 
 

 , smallest period occurs when n=1 so,  



From (1) p9-5, we know that  
Then,  
Thus, the period of both of these functions is also  .



From (1) p.9-7, we know  
Also,  

Thus,   showing    is a periodic function with period  . 

Author edit

This problem is solved and uploaded by Radina Dikova

R 6.2 edit

Question edit

Is the given function even or odd or either even nor odd? Find its Fourier series. Show details of your work.

 
 

Author edit

Solved and uploaded by William Knapper

R 6.3 edit

Question edit

K 2011 p.491 pbs 15,17
Find if the graph is for an even or odd problem and then find the fourier series. Graph the resulting equations.
Problem 15:


Problem 17:

Solution edit

For problem 15:
f(-x) = -f(x), therefore the graph shows an odd function. Similarly, L =  .
Therefore we can use the Euler formula for an odd function:
 
 
During  , f(x) = x. During  ,  
Therefore,  
Using integration by parts shows   to be:
 
when, for the first integral:
 
and for the second integral (where u, du, v, and dv are not the same as the first integral):
 
Therefore, when n is odd,   and when n is even,  
Therefore, the fourier series' are as follows:
For n=2 ->  
For n=4 ->  
For n = 8 ->  
A graph of the fourier series' is shown below:


For Problem 17:   Therefore, it is an even function and L = 1. Similarly, because it's an even function, the Euler equations for an even function can be used:
 
 
 
During [0,1],  
Therefore:
 
However, the period is not 2 , so in     is replaced with   to shift the function to a period of 2 . Similarly,   is replaced with   since L = 1.
Therefore:
 
Letting   where u, du, v, and dv are not the same as was used in number 15 above.
Integration by parts then yields:
 
  and when n is even,  
Therefore, the fourier series's are as follows:
For n = 2 ->  
For n = 4 ->  
For n = 8 ->  

Author edit

This problem was solved and uploaded by John North

R 6.4 edit

Question edit

Consider the L2-ODE-CC with the window function f(x) from p9-8 as excitation:

  where r(x) = f(x)

and the initial conditions

 

1. Find   such that:

 

with the same initial conditions as above.

Plot   for n = 3, 6, 9 for x in [0, 10]

2. Use the matlab command ode45 to integrate the L2-ODE-CC and plot the numerical soln to compare with the analytical soln.

Level 1: n = 0,1

Solution edit

 

 

The Fourier series of a periodic function

  cos(nωx) +   sin(nωx)]

For an odd function the Fourier series will be the following:

  sin(nωx)  

The independent variable t will be used to shift x to the left

 

The period of oscillation and frequency of oscillation will be as follows:

 

ω = π/2

where  

which comes to be:   (1 - cosnπ)

  = 1/2 + (2/nπ) sin(nπ/2}t

The homogeneous equation for Y will be as follows:

 

 

Author edit

This problem was solved and uploaded by Mike Wallace

R 6.5 edit

Question edit

Redo R4.2 to redisplay the particular solution, the homogenous solution, and the exact solution for n = 3,5,9 over the interval [0,20π]

Redisplay the particular solution, the homogenous solution, and the exact solution. Superpose each solution with the exact solution.

Redo R4.3 with the TA code over the interval [0.10]. Zoom in about x = -0.5, 0, and 0.5 and comment on the accuracy of different approximations.

Redo R4.4 with the TA code over the interval [0.9,10] for n = 4, 7. Zoom in about x = 1, 1.5, 2, 2.5 and comment on the accuracy of different approximations.

Solution edit

R 4.2 redo edit

The re-displayed functions for the homogenous solutions are:

 

 

 

The re-displayed functions for the particular solutions are:

 

 

 

 

 

 

The re-displayed functions for the general solutions are:

 

 

 

 

 

 

 

Plot for  

Plot for  

Plot for  

R 4.3 Redo edit

Matlab code:

x = 0:0.01:10;

y = log(1+x);

EDU>> x1 = 0:0.01:10;

EDU>> y1 = zeros(1,1001);

EDU>> for i = 1:4

for j = 1:1001

y1(j) = y1(j) - ((-x1(j))^i)/i;

end

end

EDU>> y2 = zeros(1,1001);

EDU>> for i = 1:7

for j = 1:1001

y2(j) = y2(j) - ((-x1(j))^i)/i;

end

end

EDU>> y3 = zeros(1,1001);

EDU>> for i = 1:11

for j = 1:1001

y3(j) = y3(j) - ((-x1(j))^i)/i;

end

end

EDU>> y4 = zeros(1,1001);

EDU>> for i = 1:16

for j = 1:1001

y4(j) = y4(j) - ((-x1(j))^i)/i;

end

end

EDU>> h = plot(x,y);

orange = [1 0.5 0.2];

EDU>> set(h,'Color',orange);

EDU>> hold on;

EDU>> plot(x1,y1,'r');

EDU>> plot(x1,y2,'g');

EDU>> plot(x1,y3,'b');

EDU>> plot(x1,y4,'c');

legend('log(1+x)','T_4','T_7','T_1_1','T_1_6');

EDU>> grid on;

EDU>> axis([0 10 -10 10])

 

Zoom plot about 0:

This plot makes it appear that only the 16 term approximation is in the window at point 0. This is, therefore, the most accurate of the other n solution approximations.

Zoom plot about 0.5:

This plot makes it appear that most of the approximations are very accurate and close to the exact solution. The only approximation that appears to deviate a little after 0.5 is the n = 4 approximation.

R 4.4 redo edit

Matlab code:

syms x

EDU>> f = log(x+1);

EDU>> fT1 = taylor(f,5,1);

EDU>> fT2 = taylor(f,8,1);

X = 0.9:0.1:10;

Y(:,1) = subs(fT1,'x',X);

EDU>> Y(:,2) = subs(fT2,'x',X);

EDU>> Y(:,3) = log(1+X);

EDU>> figure

EDU>> plot(X,Y);

axis([0.9 10 -10 10])

 

Zoom in about 1:

This shows that neither of the approximations are very close about x = 1 to the exact solution.

Zoom in about 1.5:

This shows that the n = 7 approximation is close about x = 1.5 to the exact solution.

Zoom in about 2:

 

This shows that all the approximations are very close to the exact solution about x = 2.

Zoom in about 2.5:

This shows that the approximations are very close about x = 2.5, however, the n = 4 approximation is beginning to deviate and soon will not be a good approximation.

Author edit

This problem was solved and uploaded by David Herrick

R 6.6 edit

Question edit

Given  

(1) Simplify the first term   on the lhs
(2) Simplify the second term   and combine with the simplified first term
(3) Finally, add the third term  

Solution edit

From Lecture Notes Sec.10 p.10-3:
Particular solution is of the form  
From Lecture Notes Sec.10 p.10-3:
 
 
We want to substitute these derivatives back into the original ODE and verify that Wolfram Alpha's solution of   is correct.

(1)

 
 

(2)

 
 
 

(3)

 
 

Comparing this to Wolfram Alpha's answer:

 

Author edit

Solved and uploaded by Joshua House

R 6.7 edit

Question edit

(1) Find the separated ODEs for the heat equation

 

Solution edit

Assuming  

Then:

 
 

Substituting partial derivatives back into original PDE:

 
 
* Where "c" is a constant, because if both sides were variables then they would never be equal one another (each side would be a function of a different variable.) Kreysig 2011, pp.546

Multiplying by the denominators to get two separate ODEs:

 
 

Author edit

Solved and uploaded by Joshua House

Contribution Summary edit

Problem 1 was solved and uploaded by: Radina Dikova

Problem 2 was solved and uploaded by: William Knapper

Problem 3 was solved and uploaded by: John North

Problem 4 was solved and uploaded by: Michael Wallace

Problem 5 was solved and uploaded by: David Herrick

Problem 6 was solved and uploaded by: Joshua House

Problem 7 was solved and uploaded by: Joshua House