University of Florida/Egm4313/s12.team5.R6

From testwiki
Jump to navigation Jump to search

Template:Big3

R 6.1

Question

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

Solution

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

For f(x)=cos(nωx) we have:
f(x+p)=cosnω(x+p)=cos(nωx+nωp)=cos(nωx)cos(nωp)sin(nωx)sin(nωp)
Thus, cos(nωx)cos(nωp)sin(nωx)sin(nωp)=cosnωx
cos(nωx)cos(nωp)=cos(nωx)(1)
cos(nωp)=1
nωp=2π

p=2πnω, smallest period occurs when n=1 so, p=2πω



For f(x)=sin(nωx) we have:
f(x+p)=sinnω(x+p)=sin(nωx+nωp)=sin(nωx)cos(nωp)cos(nωx)sin(nωp)< br /> Thus, sin(nωx)cos(nωp)cos(nωx)sin(nωp)=sin(nωx)
sin(nωx)cos(nωp)=sin(nωx)(1)
cos(nωp)=1
nωp=2π

p=2πnω, smallest period occurs when n=1 so, p=2πω



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



From (1) p.9-7, we know ao=12L02Lf(x)dx=1p<f,1>
Also, ao=12π02πf(x)dx=1p<f,1>

Thus, p=2π showing  ao is a periodic function with period p. 

Author

This problem is solved and uploaded by Radina Dikova

R 6.2

Question

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

11.f(x)=x2,(1<x<1),p=2
12.f(x)=1x24,(2<x<2),p=4

Author

Solved and uploaded by William Knapper

R 6.3

Question

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

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:
f(x)=n=1bnsin(nx)
bn=2π0πf(x)sin(nx)dx
During [0,π2], f(x) = x. During [π2,π], f(x)=πx
Therefore, bn=2π(0π2xsin(nx)dx+π2π(πx)sin(nx)dx)
Using integration by parts shows bn to be:
bn=2πn2(2sin(π2n)sin(πn))
when, for the first integral:
u=x,du=dx,dv=sin(nx)dx,andv=1ncos(nx)
and for the second integral (where u, du, v, and dv are not the same as the first integral):
u=πx,du=dx,dv=sin(nx)dx,andv=1ncos(nx)
Therefore, when n is odd, bn=+or4πn2 and when n is even, bn=0
Therefore, the fourier series' are as follows:
For n=2 -> f(x)=4πsin(x)
For n=4 -> f(x)=4πsin(x)+4π9sin(3x)
For n = 8 -> f(x)=4πsin(x)+4π9sin(3x)+4π25sin(5x)+4π49sin(7x)
A graph of the fourier series' is shown below:


For Problem 17: f(x)=f(x) 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:
f(x)=a0+n=1ancos(nx)
a0=1π0πf(x)dx
an=2π0πf(x)cos(nx)dx
During [0,1], f(x)=1x
Therefore:
a0=01(1x)dx=12
However, the period is not 2π, so in an cos(nx) is replaced with cos(nπx) to shift the function to a period of 2π. Similarly, 2π is replaced with 21 since L = 1.
Therefore:
an=201(f(x)cos(nπx))dx=201((1x)cos(nπx))dx
Letting u=1x,du=dx,dv=cos(nπx)dx,v=1nπsin(nπx) where u, du, v, and dv are not the same as was used in number 15 above.
Integration by parts then yields:
an=2(1n2π2(cos(nπ)+1n2π2)
Therefore,whennisodd,<math>an=4n2π2 and when n is even, an=0
Therefore, the fourier series's are as follows:
For n = 2 -> f(x)=12+4π2cos(πx)
For n = 4 -> f(x)=12+4π2cos(πx)+49π2cos(3πx)
For n = 8 -> f(x)=12+4π2cos(πx)+49π2cos(3πx)+425π2cos(5πx)+449π2cos(7πx)

Author

This problem was solved and uploaded by John North

R 6.4

Question

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

 y3y+2y=r(x)  where r(x) = f(x)

and the initial conditions

 y(0)=1,y(0)=0 

1. Find  yn(x)  such that:

 yn+ayn+byn=rn(x) 

with the same initial conditions as above.

Plot  yn(x)  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

 λ23λ+2=0=>(λ2)(λ1)=0 

 λ1,2=2,1 

The Fourier series of a periodic function

 f(x)=a0+n=1[an  cos(nωx) +  bn  sin(nωx)]

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

 f(x)=n=1bn  sin(nωx)  =n=1bnsin(n*piLx)dx 

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

 t=x14 

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

 p=2L=4 

ω = π/2

where  bn=2L0Lf(x)sin(n*piLx)dx=1202f(x)sin(n*pi2x)dx 

which comes to be:  bn=An*pi  (1 - cosnπ)

 y3y+2y=r(x)  = 1/2 + (2/nπ) sin(nπ/2}t

The homogeneous equation for Y will be as follows:

 Yh=C1e2x+C2ex 

 Y=Yh+Yp=C1e2x+C2ex+C3 

Author

This problem was solved and uploaded by Mike Wallace

R 6.5

Question

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

R 4.2 redo

The re-displayed functions for the homogenous solutions are:

y3h(x)=2ex0.8008e2x 

y5h(x)=2.0001ex0.8001e2x 

y9h(x)=2ex0.8e2x 

The re-displayed functions for the particular solutions are:

y3p(x)=9.9206*105x70.0010x60.0031x50.0078x40.0990x30.3984x20.3984x0.1992 

y5p(x)=1.2526*108x112.0668*107x101.0334*106x94.6503*106x81.1781*104x7 

0.0011x60.0033x50.0083x40.0999x30.3999x20.399x0.2000 

y9p(x)=4.1103*1018x191.1714*1016x181.0543*1015x178.9615*1015x16 

4.5405*1013x159.1408*1012x146.3985*1011x134.1590*1010x121.5021*108x112.2040*107x10

1.1020*106x94.9591*106x81.1904*104x70.0011x60.0033x50.0083x40.1000x30.4000x20.4000x0.2000 

The re-displayed functions for the general solutions are:

y3(x)=2ex0.8008e2x9.9206*105x70.0010x60.0031x50.0078x40.0990x30.3984x20.3984x0.1992 

y5(x)=2.0001ex0.8001e2x1.2526*108x112.0668*107x101.0334*106x94.6503*106x8 

1.1781*104x70.0011x60.0033x50.0083x40.0999x30.3999x20.399x0.2000 

y9(x)=2ex0.8e2x4.1103*1018x191.1714*1016x181.0543*1015x178.9615*1015x16 

4.5405*1013x159.1408*1012x146.3985*1011x134.1590*1010x121.5021*108x11 

2.2040*107x101.1020*106x94.9591*106x81.1904*104x70.0011x6 

0.0033x50.0083x40.1000x30.4000x20.4000x0.2000 

Plot for y3(x) 

Plot for y5(x) 

Plot for y9(x) 

R 4.3 Redo

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

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

This problem was solved and uploaded by David Herrick

R 6.6

Question

Given yp+4yp+13yp=2e2xcos(3x)

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

Solution

From Lecture Notes Sec.10 p.10-3:
Particular solution is of the form yp(x)=xe2x[Mcos(3x)+Nsin(3x)]
From Lecture Notes Sec.10 p.10-3:
yp'(x)=e2x[sin(3x)(3mx2nx+n)+cos(3x)(2mx+m+3nx)]
yp'(x)=e2x[sin(3x)[6m(2x1)n(5x+4)]cos(3x)[m(5x+4)+6n(2x1)]]
We want to substitute these derivatives back into the original ODE and verify that Wolfram Alpha's solution of 6e2x[ncos(3x)msin(3x)] is correct.

(1)

yp'=e2x[sin(3x)[6m(2x1)n(5x+4)]cos(3x)[m(5x+4)+6n(2x1)]]
y'p=e2x[12mxsin(3x)6msin(3x)5nxsin(3x)4nsin(3x)5mxcos(3x)4mcos(3x)12nxcos(3x)+6ncos(3x)]

(2)

yp'=e2x[sin(3x)(3mx2nx+n)+cos(3x)(2mx+m+3nx)]
4yp=e2x[12mxsin(3x)8nxsin(3x)+4nsin(3x)8mxcos(3x)+4mcos(3x)+12nxcos(3x)]
y'p+4y'p=e2x[6msin(3x)13nxsin(3x)13mxcos(3x)+6ncos(3x)]

(3)

13yp=e2x[13mxcos(3x)+13nxcos(3x)]
y'p+4y'p+13yp=e2x[6msin(3x)+6ncos(3x)]

Comparing this to Wolfram Alpha's answer:

6e2x[ncos(3x)msin(3x)]=6e2x[ncos(3x)msin(3x)]

Author

Solved and uploaded by Joshua House

R 6.7

Question

(1) Find the separated ODEs for the heat equation

ut=κ2ux2

Solution

Assuming u(x,t)=F(x)G(t)

Then:

u(x,t)t=F(x)G˙(t)
2u(x,t)x2=F(x)G(t)

Substituting partial derivatives back into original PDE:

F(x)G˙(t)=κF(x)G(t)
G˙(t)κG(t)=F(x)F(x)=c
* 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:

F(x)cF(x)=0
G˙(t)κcG(t)=0

Author

Solved and uploaded by Joshua House

Contribution Summary

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