Professional Documents
Culture Documents
Student Number
By signing below, you declare that this work was your own and that you have not copied from any other
individual or other source.
Signature
y (1) = c1 + c2 + 2c3 = 3
y 00 (1) = c2 + 2c3 = 1
c1 + 1 = 3
c1 = 4
4 + c3 = 1
c3 = 3
c2 = 5
c2 + 6 = 1
y = 4x 5x ln x + 3x2
(b) y 000 4y 00 + y 0 + 6y = 8 cos x + 18x + 3, y(0) = 56 , y 0 (0) = 11, y 00 (0) =
Using long division, we have
m2 5m + 6
11
5
m + 1 m3 4m2 + m + 6
m3 + m2
5m2
5m2 5m
6m
6m + 6
0
Thus the characteristic equation is
(m + 1)(m 2)(m 3) = 0
m = 1, 2, 3
yh = c1 ex + c2 e2x + c3 e3x
Using the method of undetermined coefficients, we can choose a particular solution of the form
yp = A cos x + B sin x + Cx + D
yp0 = A sin x + B cos x + C
yp00 = A cos x B sin x
yp000 = A sin x B cos x
Thus
yp000 4yp00 + yp0 + 6yp = A sin x B cos x + 4A cos x + 4B sin x A sin x + B cos x + C
+ 6A cos x + 6B sin x + 6Cx + 6D = 8 cos x + 8x + 3
Collecting like terms, we have
(A + 4B A + 6B) sin x + (B + 4A + B + 6A) cos x + 6Cx + (C + 6D) = 8 cos x + 8x + 3
10B = 0
10A = 8
6C = 18
3 + 6D = 3
4
yp = cos x + 3x
5
Hence the solution is
4
cos x + 3x
5
4
y 0 = c1 ex + 2c2 e2x + 3c3 e3x sin x + 3
5
4
00
x
2x
3x
y = c1 e + 4c2 e + 9c3 e cos x
5
y = c1 ex + c2 e2x + c3 e3x +
6
5
= 2
11
=
5
= 2
=
c1 + 2c2 + 3c3 = 14
c1 + 4c2 + 9c3 = 3
61
c1 =
12
37
c2 =
3
21
c3 =
4
61 x 37 2x 21 3x 4
y = e e + e + cos x + 3x
12
3
4
5
B=0
4
A=
5
C=3
D=0
[3]
m3 + 2m2 = 0
m2 (m + 2) = 0
m = 0, 0, 2
yh = c1 + c2 x + c3 e2x
Using the method of undetermined coefficients, we have
yp = Ae2x + Bx3 + Cx2
Note that we need two powers of x, but 1 and x are part of the homogeneous solution, so we use the
next two available powers. Then
yp0 = 2Ae2x + 3Bx2 + 2Cx
yp00 = 4Ae2x + 6Bx + 2C
yp000 = 8Ae2x + 6B
Thus
yp000 + 2yp00 = 8Ae2x + 6B + 8Ae2x + 12Bx + 4C = 32e2x + 24x
16Ae2x + 12Bx + 6B + 4C = 32e2x + 24x
A=2
B=2
6B + 4C = 0
C = 3
yp = 2e2x + 2x3 3x2
Hence the solution is
y = c1 + c2 x + c3 e2x + 2e2x + 2x3 3x2
y 0 = c2 2c3 e2x + 4e2x + 6x2 6x
y 00 = 4c3 e2x + 8e2x + 12x 6
y (0) = c2 2c3 + 4 = 0
y 00 (0) = 4c3 + 8 6 = 14
c3 = 3
c2 = 2
c1 = 1
y = 1 + 2x + 3e2x + 2e2x + 2x3 3x2
(d) y 00 + y = cos2 x , y(0) = y 0 (0) = 2
The characteristic equation is
[3]
m2 + 1 = 0
m = i
yh = c1 cos x + c2 sin x
2
cos x
Thus
c01 (x) = c02 (x) tan x
2
c02 (x) tan x sin x c02 (x) cos x =
cos x
c02 (x) sin2 x + c02 (x) cos2 x = 2
c02 (x) = 2
c2 (x) = 2x
c01 (x) = 2 tan x
Z
sin x
dx
c1 = 2
cos x
u = cos x
du
= sin x
dx
dx
du =
sin x
c1 (x) = 2
du
u
sinx
sinx
= 2 ln |u|
= 2 ln |cos x|
yp = 2 ln |cos x| cos x + 2x sin x
Thus the general solution is
y = c1 cos x + c2 sin x + 2 ln |cos x| cos x + 2x sin x
2
2 ln |cos x| sin x + 2 sin x + 2x cos x
y 0 = c1 sin x + c2 cos x
sin x
cosx
cosx
The initial conditions are thus
y(0) = c1 = 2
y 0 (0) = c2 = 2
Hence the solution is
y = 2 cos x + 2 sin x + 2 ln |cos x| cos x + 2x sin x.
Note: the absolute value signs are crucial here, as cos x can easily be negative.
(e) x3 y 000 6xy 0 + 12y = 20x4 , x > 0, y(1) = 83 , y 0 (1) =
The inidical equation is
50
3 ,
y 00 (1) = 14
r(r 1)(r 2) 6r + 12 = 0
(r 2)[r(r 1) 6] = 0
(r 2)(r2 r 6) = 0
(r 2)(r + 2)(r 3) = 0
r = 2, 3
yh = c1 x2 + c2 x2 + c3 x3
We could use the method of undetermined coefficients, but lets use the method of variation of
parameters to see how it works in this kind of example. Note that in order to do this, the original
equation must be in standard form, which is
y 000 6x2 y 0 + 12x3 y = 20x
The particular solution comes from
yp = c1 (x)x2 + c2 (x)x2 + c3 (x)x3
Hence
c01 (x)x2 + c02 (x)x2 + c3 (x)x3 = 0
c01 (x)2x c02 (x)2x3 + c3 (x)3x2 = 0
c01 (x)2 + c02 (x)6x4 + c3 (x)6x = 20x
c01 (x) =
0
x2
x3
3
3x2
det 0 2x
4
20x 6x
6x
x2
x2
x3
3
3x2
det 2x 2x
2
6x4
6x
100x
=
= 5x
20
5
c1 (x) = x2
2
x2
0
x3
det 2x 0 3x2
2 20x 6x
c02 (x) =
2
x
x2
x3
x2
x2
0
det 2x 2x3 0
4
2
6x
20x
c03 (x) =
x2
x2
x3
c1 + c2 + c3 = 1
2c1 2c2 + 3c3 = 10
2c1 6c2 + 6c3 = 6
c1 = 3
c2 = 2
c3 = 0
5
y = 3x2 2x2 + x4
3
(f) x2 y 00 2xy 0 + 2y = x2 , x > 0, y(1) = 3, y 0 (1) = 5
The indicial equation is
[3]
r(r 1) 2r + 2 = 0
(r 1)(r 2) = 0
r = 1, 2
yh = c1 x2 + c2 x
Using the method of variation of parameters, we have
c01 (x)x2 + c02 (x)x = 0
c01 (x)2x + c01 (x) = 1
"
x2 x
2x 1
#"
"
" #
c01 (x)
0
=
c02 (x)
1
"
1
c01 (x)
1
x
= 2
0
2
c2 (x)
x 2x 2x x2
"
1 x
= 2
x x2
"
1
x
#" #
0
1
c1 (x) = ln |x|
c2 (x) = x
Thus the particular solution is
yp = x2 ln |x| x x = x2 ln |x| x2
(where c1 = c1 1)
y = 2
c1 x + c2 + 2x ln |x| + x
Applying the initial conditions, we have
y(1) = c1 + c2 = 3
2
c1 + c2 + 1 = 5
c2 = 3 c1
2
c1 + 3 c1 + 1 = 5
c1 = 1
c2 = 2
y = x2 + 2x + x2 ln |x|
2.5(2.5 1)
2.5(2.5 1)(2.5 2)
(0.06778) +
(0.61884)
2
6
= 0.01305
The error satisfies
3 = 2.5(2.5 1)(2.5 2)(2.5 3)
0.2 (4)
f (t)
4!
a1 + b1 (1.2) = 0.0345
a1 + b1 (1.4) = 0.11478
a2 + b2 (1.4) = 0.11478
a2 + b2 (1.6) = 0.356
0.0345
a1
1 1.2 0 0
1 1.4 0 0 b 0.11478
0 0 1 1.4 a2 0.11478
0.356
0 0 1 1.6 b2
1
1 1.2 0 0
a1
b 1 1.4 0 0
=
a2 0 0 1 1.4
0 0 1 1.6
b2
0.0345
0.11478
0.11478
0.356
0.44718
0.4014
3.41024
2.3539
Thus the linear spline is
1.22
1.23
1 1.2
1 1.4 1.42
1.43
0 0
0
0
0 0
0
0
0 1 2(1.4) 3(1.4)2
0 0
2
6(1.4)
0 0
2
6(1.2)
0 0
0
0
0 0
0
0
0.0345
0 0
0
0
0.11478
1 1.4
1.42
1.43
0.11478
1 1.6
1.62
1.63
0.356
0 1 2(1.4) 3(1.4)2
0
0 0
2
6(1.4)
0
0
0 0
0
0
0 0
2
6(1.6)
0
Using Matlab or Excel (or even by hand if youre feeling brave), we find
a1 = 28.48347
b1 = 73.302875
c1 = 61.99425
d1 = 17.220625
a2 = 66.02332
b2 = 129.211675
c2 = 82.659
d2 = 17.220625