General Solution of 2nd Order Differential Equaiton

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
mm391
Messages
65
Reaction score
0

Homework Statement



Find the general solution to d2y/dx2 +4y=cos(2x)

Homework Equations





The Attempt at a Solution



I have woked out what I think is the Complementary function C1sin(2x)+C2cos(2x) the reason it is cos and sin is because the roots are 2i and therefore the exponential and imaginary number turn it into a cos or sin.

Particular Integral:
y = a cos(2x) + b sin(2x)
y' = -2a sin(2x) + 2b cos(2x)
y'' = 4a cos(2x) - 4b sin(2x)

∴ -4a cos(2x) + 4b sin(2x) + 4a cos(2x) - 4b sin(2x) = cos(2x)

but it all cancels out to give 0=cos(2x) which surely can't be right. Have I been staring at this so long that I cannot see the obvious answer?
 
Physics news on Phys.org
mm391 said:

Homework Statement



Find the general solution to d2y/dx2 +4y=cos(2x)

Homework Equations





The Attempt at a Solution



I have woked out what I think is the Complementary function C1sin(2x)+C2cos(2x) the reason it is cos and sin is because the roots are 2i and therefore the exponential and imaginary number turn it into a cos or sin.

Particular Integral:
y = a cos(2x) + b sin(2x)
y' = -2a sin(2x) + 2b cos(2x)
y'' = 4a cos(2x) - 4b sin(2x)

∴ -4a cos(2x) + 4b sin(2x) + 4a cos(2x) - 4b sin(2x) = cos(2x)

but it all cancels out to give 0=cos(2x) which surely can't be right. Have I been staring at this so long that I cannot see the obvious answer?

Since cos(2x) and sin(2x) satisfy the homogeneous equation, of course when you plug any linear combination of them into it you are going to get zero. So they can't make the solution of the non-homogeneous equation. Your text should have a section about what to do when the right hand side is a solution of the homogeneous equation. Try$$
y_p = Cx\cos(2x)+Dx\sin(2x)$$