Finding Constants in Second Order DE with Given Conditions

  • Thread starter Thread starter phospho
  • Start date Start date
  • Tags Tags
    Second order
phospho
Messages
250
Reaction score
0
given that y = 2 at x = 0 and \frac{dy}{dx} = -5 at x = 0, find y in terms of x given further that

\frac{d^2y}{dx^2} + \frac{dy}{dx} = 2x +3

finding the complementary function:

m^2 + m = 0
m(m+1) = 0
m = 0, m = -1

so complementary function y = A + Be^(-x)

Particular integral:

let y = px + q

\frac{dy}{dx} = p
\frac{d^2y}{dx^2} = 0

so subbing this into the second order DE: 0 + p = 2x + 3
hence p = 3

so particular integral is y = 3x + q

hence general solution is:

y = A + Be^(-x) + 3x + q
y = 2, x = 0
hence 2 = A + B + q
dy/dx = -Be^(-x) + 3
dy/dx = -2 at x = 0 hence B = 8

so 2 = A + 8 + q

how do I find A and q?
 
Physics news on Phys.org
phospho said:
given that y = 2 at x = 0 and \frac{dy}{dx} = -5 at x = 0, find y in terms of x given further that

\frac{d^2y}{dx^2} + \frac{dy}{dx} = 2x +3

finding the complementary function:

m^2 + m = 0
m(m+1) = 0
m = 0, m = -1

so complementary function y = A + Be^(-x)

Particular integral:

let y = px + q

Wrong choice since a constant satisfies the homogeneous equation. Try ##y_p = Ax^2 + Bx##
 
phospho said:
given that y = 2 at x = 0 and \frac{dy}{dx} = -5 at x = 0, find y in terms of x given further that

\frac{d^2y}{dx^2} + \frac{dy}{dx} = 2x +3

finding the complementary function:

m^2 + m = 0
m(m+1) = 0
m = 0, m = -1

so complementary function y = A + Be^(-x)

Particular integral:

let y = px + q

\frac{dy}{dx} = p
\frac{d^2y}{dx^2} = 0

so subbing this into the second order DE: 0 + p = 2x + 3
hence p = 3

so particular integral is y = 3x + q

hence general solution is:

y = A + Be^(-x) + 3x + q
y = 2, x = 0
hence 2 = A + B + q
dy/dx = -Be^(-x) + 3
dy/dx = -2 at x = 0 hence B = 8

so 2 = A + 8 + q

how do I find A and q?

You don't need to. A and q are constants and appear only in the combination A+q, so you might as well call this a new constant C and write y = C + 3x + B exp(-x). All you care about is the value of C.
 
LCKurtz said:
Wrong choice since a constant satisfies the homogeneous equation. Try ##y_p = Ax^2 + Bx##

Why is that?

If I do use that, I get the general solution to be y = 6e^(-x) -4 + x^2 + x

Ray Vickson said:
You don't need to. A and q are constants and appear only in the combination A+q, so you might as well call this a new constant C and write y = C + 3x + B exp(-x). All you care about is the value of C.

now if I do it as above, and just call it a new constant then I go on to get y = 8e^(-x) + 3x - 6 as the general solution
 
phospho said:
Why is that?

If I do use that, I get the general solution to be y = 6e^(-x) -4 + x^2 + x



now if I do it as above, and just call it a new constant then I go on to get y = 8e^(-x) + 3x - 6 as the general solution

Which is the correct answer.
 
JasonPhysicist said:
Which is the correct answer.

Are you sure? What does LCKurtz mean then?

Thanks
 
phospho said:
Are you sure? What does LCKurtz mean then?

Thanks

Sorry for not paying enough attention. Indeed, you have to choose something like Ax^2 +Bx (instead of Ax+B)as your particular solution, since you already have a constant as a solution from the homogenous equation.
 
@phospho: There is quite a bit of incorrect information/advice in this thread.

The advice Ray gave in post #3 is irrelevant because y = C + 3x + B exp(-x) isn't a solution to your problem no matter what C is.

The "solutions" that you mention in post 4 of y = 6e^(-x) -4 + x^2 + x and y = 8e^(-x) + 3x - 6 are both incorrect, and neither would be called the general solution even if they were correct.

Your characteristic equation ##m^2+m=0## and complementary solution ##y_c = A + Be^{-x}## are both correct. That is the general solution of the homogeneous equation. To get the general solution of the NH equation you need to add to that a particular solution ##y_p## on the NH equation. Once you have that then ##y = y_c+y_p=A + Be^{-x}+y_p## will be the general solution to the equation. It won't be the solution to your problem until you figure out what values the constants must be to make satisfy the initial conditions.

When choosing what to "guess" for ##y_p##, you must note that a constant satisfies the homogeneous equation, so it can't possibly help solving the NH equation. That is why instead of trying ##y_p = Mx+N## you must multiply by ##x## and try ##y_p = Mx^2+Nx##. Only after figuring out M and N and writing the general solution of the NH equation as above do you evaluate the initial conditions to figure out A and B. And when you are done, check that your answer works by plugging it back in everything.
 
Last edited:
phospho said:
Why is that?
If you differentiate your original equation twice, you get
$$y'''' + y''' = 0,$$ which is a homogeneous equation. Its characteristic equation is ##m^4+m^3=0##, which has roots m=-1, 0, 0, and 0. This tells you the solution is of the form ##y = Ae^{-x} + B + Cx + Dx^2##. The first two terms correspond to the homogeneous solution you found to the original differential equation. The last two terms correspond to the particular solution. Because one of the m=0 roots corresponds to a term in the homogeneous solution, the terms in the particular solution pick up an extra power of x.
 
  • #10
vela said:
If you differentiate your original equation twice, you get
$$y'''' + y''' = 0,$$ which is a homogeneous equation. Its characteristic equation is ##m^4+m^3=0##, which has roots m=-1, 0, 0, and 0. This tells you the solution is of the form ##y = Ae^{-x} + B + Cx + Dx^2##. The first two terms correspond to the homogeneous solution you found to the original differential equation. The last two terms correspond to the particular solution. Because one of the m=0 roots corresponds to a term in the homogeneous solution, the terms in the particular solution pick up an extra power of x.

And that is the most succinct description of the method of annihilators I have seen. :smile:
 
  • #11
Sorry for the late reply,

thank you for the help, I understand it now after doing many more questions.
 
Back
Top