Non-Homogenous Differential Equation help

Watch this thread
TAEuler
Badges: 12
Rep:
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#1
Report Thread starter 3 years ago
#1
Spot the mistake please. I've been looking for ages and cannot find it:

Solve the following differential equation subject to the given boundary conditions:

d^2y/dx^2 - 4(dy/dx) + 5y = cos 2x + 8 sin 2x given y(0) = 9 and y'(pi/2) = 4e^pi - 1

My workings:

Auxiliary equation: lambda^2 - 4*lambda + 5 = 0
hence lambda = 2 +- i

Complementary function: y = e^2x (A cos x + B sin x)

particular integral in the form y= a cos mx + b sin mx
dy/dx = -am sin mx + bm cos mx
d^2y/dx^2 = - am^2cosmx - bm^2sin mx

-am^2cosmx - bm^2sinmx - 4(-amsinmx + bmcosmx) + 5(a cos mx + b sin mx) = cos 2x + 8 sin 2x

m = 2: -4acos 2x - 4b sin 2x + 8a sin 2x - 8b cos 2x + 5a cos 2x + 5b sin 2x = cos 2x + 8 sin 2x

comparing coefficients:
cos 2x: -4a - 8b + 5a = 1
a - 8b = 1
sin 2x: - 4b + 8a + 5b = 8
8a + b = 8

solve simultaneously to get a = 1, b = 0
hence the particular integral is y = cos 2x
hence the general solution is y = e^2x (A cos x + B sin x) + cos 2x
y(0) = 9: 9 = A + 1
A = 8

This is where I get stuck:
y = Ae^2x cos x + Be^2x sin x + cos 2x
y' = 2Ae^2x cos x - Ae^2x sin x + 2Be^2x sin x + Be^2x cos x - 2 sin 2x
y'(0) = 4e^pi - 1
4e^pi - 1 = -Ae^pi + 2Be^pi

this is where I get stuck, I'm sure there must be a constant term, but even if not, we know A = 8, and if that's true, 4 = -8 + 2B
2B = 12
B = 6

However the textbook says B = 4

What've I done wrong????
0
reply
mqb2766
Badges: 19
Rep:
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#2
Report 3 years ago
#2
(Original post by TAEuler)
Spot the mistake please. I've been looking for ages and cannot find it:

Solve the following differential equation subject to the given boundary conditions:

d^2y/dx^2 - 4(dy/dx) + 5y = cos 2x + 8 sin 2x given y(0) = 9 and y'(pi/2) = 4e^pi - 1

My workings:

Auxiliary equation: lambda^2 - 4*lambda + 5 = 0
hence lambda = 2 +- i

Complementary function: y = e^2x (A cos x + B sin x)

particular integral in the form y= a cos mx + b sin mx
dy/dx = -am sin mx + bm cos mx
d^2y/dx^2 = - am^2cosmx - bm^2sin mx

-am^2cosmx - bm^2sinmx - 4(-amsinmx + bmcosmx) + 5(a cos mx + b sin mx) = cos 2x + 8 sin 2x

m = 2: -4acos 2x - 4b sin 2x + 8a sin 2x - 8b cos 2x + 5a cos 2x + 5b sin 2x = cos 2x + 8 sin 2x

comparing coefficients:
cos 2x: -4a - 8b + 5a = 1
a - 8b = 1
sin 2x: - 4b + 8a + 5b = 8
8a + b = 8

solve simultaneously to get a = 1, b = 0
hence the particular integral is y = cos 2x
hence the general solution is y = e^2x (A cos x + B sin x) + cos 2x
y(0) = 9: 9 = A + 1
A = 8

This is where I get stuck:
y = Ae^2x cos x + Be^2x sin x + cos 2x
y' = 2Ae^2x cos x - Ae^2x sin x + 2Be^2x sin x + Be^2x cos x - 2 sin 2x
y'(0) = 4e^pi - 1
4e^pi - 1 = -Ae^pi + 2Be^pi

this is where I get stuck, I'm sure there must be a constant term, but even if not, we know A = 8, and if that's true, 4 = -8 + 2B
2B = 12
B = 6

However the textbook says B = 4

What've I done wrong????
B is wrong, e^pi is a number not a signal. But wolfram alpha gives a different anwer (for B)
https://www.wolframalpha.com/input/?...3D+4e%5Epi+-+1
Is the 2nd initial condition correct?
Last edited by mqb2766; 3 years ago
0
reply
mqb2766
Badges: 19
Rep:
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#3
Report 3 years ago
#3
(Original post by mqb2766)
B is wrong, e^pi is a number not a signal. But wolfram alpha gives a different anwer (for B)
https://www.wolframalpha.com/input/?...3D+4e%5Epi+-+1
Is the 2nd initial condition correct?
Assuming B is 4, you can reverse engineer the initial condition:
https://www.wolframalpha.com/input/?...t+x+%3D+pi%2F2

y'(pi/2) = -4 e^2 (-1 + π)

so either the IC or the model answer is wrong.
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest

Does school Maths prepare people well enough for the future?

Yes, it gives everyone a good foundation for any future path (31)
33.7%
Somewhat, if your future involves maths/STEM (43)
46.74%
No, it doesn't teach enough practical life skills (17)
18.48%
Something else (tell us in the thread) (1)
1.09%

Watched Threads

View All