Jump to content

University of Florida/Egm4313/s12 Report 4, Problem 4.3

From Wikiversity

Problem 4.3

[edit | edit source]

Problem 4.3 Part 1

[edit | edit source]

Problem Statement

[edit | edit source]

Solution

[edit | edit source]

Problem 4.3 Part 2

[edit | edit source]

Problem Statement

[edit | edit source]

Given: y″−3y′+2y=r(x)

where r(x)=log⁡(1+x)

With initial conditions: y(−34)=1,y′(−34)=0

Find the overall solution yn(x) for n=4,7,11 and plot these solutions on the interval from [−34,3]

Solution

[edit | edit source]

First we find the homogeneous solution to the ODE:
The characteristic equation is:
λ2−3λ+2=0
(λ−2)(λ−1)=0
Then, λ=1,2
Therefore the homogeneous solution is:
yh=C1e(2x)+c2ex

Now to find the particulate solution
For n=4

r(x)=∑0n−(−1)nxnnln⁡(10)

r(x)=xln⁡(10)−x22ln⁡(10)+x33ln⁡(10)−x44ln⁡(10)

We can then use a matrix to organize the known coefficients:

[2−320002−660002−9120002−1200002][K0K1K2K3K4]=[01ln(10)12ln(10)13ln(10)14ln(10)]

Then, using MATLAB and the backlash operator we can solve for these unknowns:
Therefore
yp4=4.0444+3.7458x+1.5743x2+0.3981x3+0.0543x4

Superposing the homogeneous and particulate solution we get
yn=4.0444+3.7458x+1.5743x2+0.3981x3+0.0543x4+C1e2x+C2ex

Differentiating:
y'n=3.7458+3.1486x+1.1943x2+0.2172x3+2C1e2x+C2ex Evaluating at the initial conditions:
y(−0.75)=0.9698261719+0.231301601C!+0.4723665527C2=1
y′(−0.75)=1.9645125+0.4462603203C1+0.4723665527C2

We obtain:
C1=−4.46
C2=0.055

Finally we have:
yn=4.0444+3.7458x+1.5743x2+0.3981x3+0.0543x4−4.46e2x+0.055ex

For n=7

r(x)=∑0n−(−1)nxnnln⁡(10)

r(x)=xln⁡(10)−x22ln⁡(10)+x33ln⁡(10)−x44ln⁡(10)+x55ln⁡(10)−x66ln⁡(10)+x77ln⁡(10)

We can then use a matrix to organize the known coefficients:

[2−320000002−660000002−9120000002−12200000002−15300000002−18420000002−2100000002][K0K1K2K3K4K5K6K7]=[01ln(10)12ln(10)13ln(10)14ln(10)15ln(10)16ln(10)17ln(10)]

Then, using MATLAB and the backlash operator we can solve for these unknowns:
Therefore
yp7=377.4833+375.3933x+185.6066x2+60.5479x3+14.4946x4+2.6492x5+0.3619x6+0.0310x7

Superposing the homogeneous and particulate solution we get
yn=377.4833+375.3933x+185.6066x2+60.5479x3+14.4946x4+2.6492x5+0.3619x6+0.0310x7+C1e(2x)+c2ex

Differentiating:
y'n=375.3933+371.213x+181.644x2+57.9784x3+13.46x4+2.1714x5+0.214x6+2C1e(2x)+C2ex Evaluating at the initial conditions:
y(−0.75)=178.816+0.2231301601C!+0.4723665527C2=1
y′(−0.75)=178.413+0.4462603203C1+0.4723665527C2

We obtain:
C1=−2.6757
C2=−375.173