University of Florida/Egm4313/s12.team5.R5

From testwiki
Revision as of 02:21, 17 October 2020 by imported>MaintenanceBot (Category:Pages with broken file links)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Big3

R5.1

Question

Find Rc for the following series:
1. r(x)=k=0(k+1)kxk

2. r(x)=k=0(1)kγkx2k

γ=constant

Use (2)-(3)p.7-31 to find Rc for the Taylor series of

3. sinx at x^=0

4. log(1+x) at x^=0

5. log(1+x) at x^=1

Solution

1. r(x)=k=0(k+1)kxk=0+2x+6x2...

Using L'Hospital's rule and (2)p.7-31, and setting dk=(k+1)k:

Rc=[limk|(k+2)(k+1)(k+1)k|]1=[limk|k+2k|]1=[limk|11|]1=1

2.r(x)=k=0(1)kγkx2k=11γx2+1γ2x4...

Using (3)p.7-31 and setting dk=(1)kγk:

Rc=limk[|(1)kγk|k]1=limk|γkk||(1)k|k=limk|γ||1|=|γ|

3. Taylor series about x^=0:

sinx=x+16x3+1120x5...k=0(1)k(2k+1)!x2k+1

Using (2)p.7-31 and setting dk=(1)k(2k+1)!:

Rc=[limk|(1)k+1(2(k+1)+1)!(1)k(2k+1)!|]1=[limk|1(2k+3)(2k+2)|]1=

4. Taylor series about x^=0:

log(1+x)=0+xx22+x33...n=0(1)k(x)k+1(k+1)

Using L'Hospital's rule and (2)p.7-31, and setting dk=(1)k(k+1):

Rc=[limk|(1)k+1(k+2)(1)k(k+1)|]1=[limk|(1)(k+1)(k+2)|]1=[limk|11|]1=1

5. Taylor series about x^=1:

log(1+x)=log(2)+(x1)2(x1)28+(x1)324...log(2)+n=0(1)k+1(x1)kk2k

Using L'Hospital's rule and (2)p.7-31, and setting dk=(1)k+1k2k:

Rc=[limk|(1)k+2(k+1)2k+1(1)k+1k2k|]1=[limk|1k2(k+1)|]1=[limk|12|]1=2

Author

This problem is solved and uploaded by Radina Dikova

R5.2

Question

Determine whether the following pairs of functions are linearly independent:

 1.f(x)=x2,g(x)=x4 

 2.f(x)=cos(x),g(x)=sin(3x) 

First use the Wronskian method, then use the Gramian method.

Solution

The Wronskian is defined as:  W(f,g):=det[fgfg]=fggf 

If  W(f,g)0  , then the functions f and g are linearly independent.

The Gramian is defined as:  Γ(f,g):=det[<f,f><f,g><g,f><g,g>] 

Where  <f,g>:=abf(x)g(x)dx 

If  Γ(f,g)0  , then the functions f and g are linearly independent.

1. Using Wronskian.

 W(f,g)=fggf=x2(4x3)x4(2x)=4x52x5=2x50

Therefore, f and g are linearly independent.

2. Using Wronskian.

 W(f,g)=fggf=cos(x)(3cos(3x))sin(3x)(sin(x))0

Therefore, f and g are linearly independent.

1. Using Gramian with an interval of [-1,1]

 <f,f>=11x2(x2)dx=15x511=25 

 <f,g>=<g,f>=11x2(x4)dx=17x711=27 

 <g,g>=11x4(x4)dx=19x911=29 

 Γ(f,g)=<f,f><g,g><f,g><g,f>=25(29)27(27)=4454490 

Therefore, f and g are linearly independent.

2. Using Gramian with an interval of [-1,1]

 <f,f>=11cos(x)(cos(x))dx=11cos2(x)dx=12111+cos(2x)dx=12(x+12sin(2x))11=1.4546 

<f,g>=<g,f>=11sin(3x)cos(x)dx=0 

<g,g>=<g,g>=11sin2(3x)dx=12111cos(6x)dx=12(x16sin(6x))11=1.04657 

 Γ(f,g)=<f,f><g,g><f,g><g,f>=1.4546(1.04657)0(0)0 

Therefore, f and g are linearly independent.

Author

This problem was solved and uploaded by David Herrick.

R5.3

Question

Verify that b1 and b2 in (1)-(2) p.7-34 are linearly independent using the Gramian

Solution

The given Grammian:

Γ(b1,b2)=[b1,b1b1,b2b2,b1b2,b2]

In reference to to (3) on p.8-9

b1,b1=(b1b2)

Calculating the dot products yields:

b1,b1=4+49=53

b1,b2=3+21=24

b2,b1=3+21=24

b2,b2=2.25+9=11.25

Plugging the dot products into the Grammian yields:

Γ=596.25576=20.250

Therefore, b1 and b2 are linearly independent.

Author

Solved and uploaded by Derik Bell

R5.4

Question

Show that: yp(x)=i=0n(yp,i(x))
is the particular solution to: y+p(x)y+q(x)y=r(x)
Discuss the choice of particular solutions in the table on p8-3. In other words, for r(x) = kcos(wx), why would you need to have both cos(wx) and sin(wx) in the particular solution?

Solution

For a single excitation that satisfies ri(x),
yp,i+p(x)yp,i+q(x)yp,i=ri(x)
for example:
yp0+p(x)yp0+q(x)yp0=r0(x)
yp1+p(x)yp1+q(x)yp1=r1(x)
yp2+p(x)yp2+q(x)yp2=r2(x)
and so on until...
yp,n+p(x)yp,n+q(x)yp,n=rn(x) where by linearity: r(x)=i=0nri(x)
Since yp,i is the solution to a single iteration of r(x) and r(x)=i=1nri(x) , then by linearity, the solution to r(x) is: yp(x)=i=1nyp,i
Part 2:
kcos(wx) is a periodic function. As shown by (3) on p8-2, any periodic function can be broken down into a fourier trigonometric series:
r(x)=a0+n=1[ancos(nwx)+bnsin(nwx)]
r(x) can be further broken down as the sum of:
ra=a0
rb=n=1ancos(nwx)
rc=n=1bnsin(nwx)
Where r(x)=ra+rb+rc
Since r(x) is expressed in terms of cos(x) and sin(x) the particular solution, which is also a sum of the individual particular solutions for each iteration of ra, rb, and rc, needs to be in terms of sin(x) and cos(x) as well. That applies to all periodic functions as shown on p8-2, which sin(x) is as well. Therefore that justifies why the particular solutions for kcos(wx), ksin(wx), keαxcoswx, and keαxsinwx must all include both cos(x) and sin(x).

Author

This problem was solved and uploaded by John North.

R5.5

Question

1. Show that cos(7x) and sin(7x) are linearly independent using the Wronskian and the Gramian (integrate over 1 period)
2. Find 2 equations for the two unknowns M,N and solve for M,N
3. Find the overall solution y(x) that corresponds to the initial condition y(0)=1, y'(0)=0. Plot the solution over 3 periods.

Solution

(1)

First, using Wronskian:

For 2 functions, f and g, the Wrosnkian is defined as W(f,g):=det[fgfg]=fggf
Where f and g are linearly independent if W(f,g)0
For f=cos(7x),g=sin(7x),f=7sin(7x),g=7cos(7x)
Then, W(f,g):=det[cos(7x)sin(7x)7sin(7x)7cos(7x)]=7cos2(7x)+7sin2(7x)0
Therefore, f and g are linearly independent

Second, using Gramian:

Consider two functions, f and g, where the scalar product is defined as
<f,g>:=abf(x)g(x)dx
And the Gramian defined as
Γ(f,g):=det[<f,f><f,g><g,f><g,g>]
Then f and g are linearly indepdent if Γ(f,g)0
For f=cos(7x) and g=sin(7x) and integrating over one period (2π7)
<f,f>=02π7cos2(7x)dx
Letting u=7x,du=7dx and changing limits of integration by plugging in old limits into "u" equation
<f,f>=1702πcos2(u)du=17[u2+14sin2u02π]=π7
<g,g>=02π7sin2(7x)dx
Letting u=7x,du=7dx and changing the limits of integration by plugging in old limits into "u" equations
<g,g>=1702πsin2(u)du=17[u214sin2u02π]=π7
<f,g>=<g,f>=02π7cos(7x)sin(7x)dx
From Kreyszig p.479, it is apparent that sin and cos are orthogonal to each other, so the above integration will equal zero
<f,g>=<g,f>=02π7cos(7x)sin(7x)dx=0
Plugging in the results of each integral into the Gramian
Γ(f,g)=det[<f,f><f,g><g,f><g,g>]=det[π700π7]=π2490
Therefore, f and g are linearly independent

(2)

Given y3y10y=3cos(7x)
And particular solutions of the form yp(x)=Mcos(7x)+Nsin(7x),y'p(x)=M7sin(7x)+N7cos(7x),y'p(x)=M49cos(7x)N49sin(7x)
Plug particular solutions back into original ODE and collect like terms
M49cos(7x)N49sin(7x)+M21sin(7x)N21cos(7x)M10cos(7x)N10sin(7x)=3cos(7x)
59Mcos(7x)59Nsin(7x)+21Msin(7x)21Ncos(7x)=3cos(7x)
Equating coefficients
59M=3M=359
21N=3N=17
M=359,N=17

(3)

The overall solution y(x)=yp(x)+yh(x) consists of the particular solution and homogeneous soloution

Homogeneous solotuion
y3y10y=0
a24b=324(10)=49>0 so we have distinct real roots
λ1,2=12[a±a24b]=12[3±7]=5,2
yh(x)=c1e5x+c2e2x
Using initial conditions y(0)=1,y(0)=1 and y'h(x)=5c1e5x2c2e2x
5c12c2=0
c1+c2=1
Solving the two equations for the two unknowns yields c1=27,c2=57
yh(x)=27e5x+57e2x
Particular solution
yp(x)=Kcos(ωx)+Msin(ωx) where ω=7,K=M=359,M=N=17
yp(x)=359cos(7x)17sin(7x)
Giving us an overall solution of
y(x)=yh(x)+yp(x)=27e5x+57e2x359cos(7x)17sin(7x)
Plotting the solution over three periods P=2π73P=6π7
Matlabcode
EDU>> x=0:0.001:(6*pi)/7;
EDU>> y=(2/7).*exp(5.*x)+(5/7).*exp(-2.*x)-(3/59).*cos(7.*x)-(1/7).*sin(7.*x);
EDU>> plot(x,y)

Author

Solved and uploaded by Joshua House

R5.6

Question

Find the solution to the following initial condition problem, and plot it over 3 periods.

y+4y+13y=2e2xcos(3x)
yh(x)=e2x(Acos(3x)+Bsin(3x))
yp(x)=xe2x(Mcos(3x)+Nsin(3x))
y(0)=1,y(0)=0

Solution

First, we take the first and second derivative of the particular solution:

y'p(x)=e2x(3Msin(3x)2Mcos(3x)+3Ncos(3x)2Nsin(3x))=e2x[(3M2N)sin(3x)+(2M+3N)cos(3x)]
y'p(x)=e2x(9Mcos(3x)+6Msin(3x)9Nsin(3x)6Ncos(3x))2e2x(3Msin(3x)2Mcos(3x)+3Ncos(3x)2Nsin(3x))
=2e2x[(12M5N)sin(3x)+(13M12N)cos(3x)]

Now, we plug the particular solution derivatives into the initial equation:

y+4y+13y=2e2xcos(3x)

2e2x[(12M5N)sin(3x)+(13M12N)cos(3x)]+4[e2x[(3M2Nsin(3x)+(2M+3N)cos(3x)]]
+13[e2x[Mcos(3x)+Nsin(3x)]]=2e2xcos(3x)

e2x[(24M10N)sin(3x)+(26M24N)cos(3x)+(12M8N)sin(3x)+(8M+12N)cos(3x)+13Mcos(3x)+13Nsin(3x)]
=2e2xcos(3x)

(12M5N)sin(3x)+(31M12N)cos(3x)=2cos(3x)

Now, we equate the coefficients of sin(3x) and cos(3x) to determine the unknown coefficients M and N:

12M5N=0
31M12N=2
N=2411,M=1011

Therefore, the particular solution is:

yp(x)=e2x[1011cos(3x)+2411sin(3x)]

Now, we focus on the homogeneous part of the solution. It is given to us as:

yh(x)=e2x[Acos(3x)+Bsin(3x)]

As you can see, this is identical to the particular solution, except that M is now A and N is now B. Therefore, the first derivative of the homogenous solution will be in the same form as the first derivative of the particular solution:

y'h(x)=e2x(3Asin(3x)2Acos(3x)+3Bcos(3x)2Bsin(3x))=e2x[(3A2B)sin(3x)+(2A+3B)cos(3x)]

Remembering the two initial conditions, y(0) = 1 and y'(0) = 0, we apply these to the homogenous equations:

yh(0)=e2x[Acos(3x)+Bsin(3x)]=1
y'h(x)=e2x[(3A2B)sin(3x)+(2A+3B)cos(3x)]=0

This yields two equations that we can use to solve for the coefficients A and B:

A=1
2A+3B=03B=2B=32

Therefore, the homoegenous solution is:

yh(x)=e2x[cos(3x)+32sin(3x)]

We find the final solution, y(x), by adding the homogenous and particular solutions as seen below:

y(x)=yh(x)+yp(x)=e2x[cos(3x)+32sin(3x)]+e2x[1011cos(3x)+2411sin(3x)]
y(x)=e2x[2111cos(3x)+8122sin(3x)]

Matlab Code: x= 0:0.001:(2*pi/3);

y = exp(-2.*x)*(21/11).*cos(3.*x) + exp(-2.*x)*(81/22).*sin(3.*x);

plot(x,y)

File:R5.6.png

Author

This problem was solved and uploaded by Will Knapper

R 5.7

Question

v=4e1+2e2=c1b1+c2b2
The oblique basis vectors are:
b1=2e1+7e2
b2=1.5e1+3e2

1. Find the components c1,c2 using the Gram matrix as in (1)p.8-11.
2. Verify the results by using (1)-(2)p.7c-34 in (2)p8-11, and rely on the non-zero determinant of the matrix of components of b1,b2 relative to the basis e1,e2, as discussed on p.7c-34.

Solution

1. Using Gram matrix as in (1) p.8-10:

[<b1,b1><b1,b2><b2,b1><b2,b2>] {c1c2} = {<b1,v><c2,v>}

From (3)p.8-9 we know that <bi,bj>=bibj. Solving the various components we get:

[53242411.25] {c1c2} = {2212}

In order to solve for c1,c2 we need to calculate the inverse of [53242411.25].

This gives is the Gram matrix as used in (1)p.8-11:
c=Γ1d

[0.555561.185191.185192.61728] {2212} = {c1c2}

Thus:
c1=2;c2=5.333=163


2. Plugging in b1,b2 into v we get:

c1(2e1+7e2)+c2(1.5e1+3e2)=4e1+2e2

2c1e1+7c1e2+1.5c2e1+3c2e2=4e1+2e2

e1(2c1+1.5c2)+e2(7c1+3c2)=4e1+2e2

Separating into components:

2c1+1.5c2=4 and 7c1+3c2=2

Solving the two linearly independent equations we get:

 
c1=2;c2=163

Author

This problem was solved and uploaded by Radina Dikova

R 5.8

Question

Find the integral (see R5.9)

 xnlog(1+x)dx 

using integration by parts and then with the help of General binomial theorem.

 (x+y)n=k=0n(nk)xnkyk 

 (nk)=n!k!(nk)!=n(n1)...(nk+1)k! 

Solution

The indefinite integral of  xn  is

 xn+1n+1+C 

For n = 0, we get  x0=x 

For n = 1, we get  x1=x22 

And the indefinite integral of  log(1+x)  is

 (x+1)log(1+x)x+C 

Integration by parts

- For n = 0  x0log(1+x)dx=log(1+x)[x+1]x 

- For n = 1  x1log(1+x)dx=12*[(xlog(1+x))+x2log(1+x)x22] 

Author

Solved and uploaded by Mike Wallace

R 5.9

Question

Consider the L2-ODE-CC(5)p.7b-7 with log(1+x) as excitation:

 y3y+2y=r(x) 

 r(x)=log(1+x) 

and the initial conditions

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

Part One

Project the excitation r(x) on the polynomial basis  [bj(x)=xj,j=0,1,...,n] 

i.e., find  dj  such that

r(x) rn(x)=j=0ndjxj 

for x in  [34,3],  and for n = 3, 6, 9

Plot  r(x),rn(x)  to show uniform approximation and convergence

Part Two

In a separate series of plots, compare the approximation of the function log(1+x) by 2 methods:

A. Projection on polynomial basis (1) p.8-17

B. Taylor series expansion about x = 0

Observe and discuss the pros and cons of each method

Find  yn(x)  such that:

 yn+ayn+byn=rn(x) 

with the same initial conditions (2) p.7c-28

Plot  yn(x)  for n = 3, 6, 9, for x in  [34,3]. 

In a series of separate plots, compare the results obtained with the projected excitation on polynomial basis to those with truncated Taylor series of the excitation. Plot also the numerical solution as a baseline for comparison.

Solution

Using  y3y+2y=log(1+x) 

For n = 0

 b0=x0 

 r=log(1+x)=C0x0 

 d0=<x0,log(1+x)>=343log(1+x)dx=2.14175 

 <x0,x0>=343x0x0dx=x|343=154 

 d0=C0<x0,x0>=C0(154)=2.14175 

 C0=0.57113 


 Y=Yh+Yp=C1e2x+C2ex+0.57113 

 Y=2C1e2x+C2ex 

 y(34)=C1e64+C2e34+0.57113=1 

 y(34)=64C1e64+C2e34=0 

Subtracting Y from Y' in order to find the coefficients

 C1e640.57113=1 

 C1=1.92205 

 C2=1.81582 


For n = 0 the final solution will be

 Y=1.92205e2x+1.81582ex+0.57113 


For n = 1

 C0=.09399,C1=0.591217 

We need to find the homogeneous Y

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

 λ1,2=2,1 

 Yh=C1e2x+C2ex 

 Y=Yh+Yp=C1e2x+C2ex0.09399+0.591217x 

Solving for the initial conditions

 y(34)=C1e64+C2e340.09399+0.591217(34)=1 

 Y==2C1e2x+C2ex+0.591217 

 y(34)=64C1e64+C2e34+0.591217=0 

This gives coefficients of:

 C1=9.5398,C2=7.761 


For n = 1 the final solution will be;

 Y=9.5398e2x+7.761ex+0.591217x0.09399 

Author

This problem was solved and uploaded by Mike Wallace

Contribution Summary

Problem 2 was solved and Problem 5 was proofread by David Herrick

Problem 5 was solved and uploaded by Joshua House

Problems 1 and 7 were solved and uploaded by Radina Dikova

Problem 3 was solved and uploaded by Derik Bell

Problem 4 was solved and uploaded by John North

Problem 8 and 9 were solved and uploaded by Mike Wallace

Problem 6 was solved and uploaded by William Knapper