Finding Constants in Second Order DE with Given Conditions

In summary, the given conversation discusses finding the general solution of a second-order differential equation with initial conditions. The complementary function and particular integral are determined, and the general solution is found to be y = A + Be^(-x) + 3x + q. However, in order to find the values of the constants and fully solve the problem, a particular solution must be added and the initial conditions must be evaluated.
  • #1
phospho
251
0
given that y = 2 at x = 0 and [itex] \frac{dy}{dx} = -5 [/itex] at x = 0, find y in terms of x given further that

[tex] \frac{d^2y}{dx^2} + \frac{dy}{dx} = 2x +3 [/tex]

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

[itex] \frac{dy}{dx} = p [/itex]
[itex] \frac{d^2y}{dx^2} = 0 [/itex]

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
  • #2
phospho said:
given that y = 2 at x = 0 and [itex] \frac{dy}{dx} = -5 [/itex] at x = 0, find y in terms of x given further that

[tex] \frac{d^2y}{dx^2} + \frac{dy}{dx} = 2x +3 [/tex]

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##
 
  • #3
phospho said:
given that y = 2 at x = 0 and [itex] \frac{dy}{dx} = -5 [/itex] at x = 0, find y in terms of x given further that

[tex] \frac{d^2y}{dx^2} + \frac{dy}{dx} = 2x +3 [/tex]

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

[itex] \frac{dy}{dx} = p [/itex]
[itex] \frac{d^2y}{dx^2} = 0 [/itex]

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.
 
  • #4
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
 
  • #5
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.
 
  • #6
JasonPhysicist said:
Which is the correct answer.

Are you sure? What does LCKurtz mean then?

Thanks
 
  • #7
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.
 
  • #8
@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:
  • #9
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.
 

Related to Finding Constants in Second Order DE with Given Conditions

1. What is a second order differential equation (DE)?

A second order differential equation is an equation that involves a second derivative of a function. It is used to model physical phenomena in fields such as physics, engineering, and economics.

2. How is a second order DE different from a first order DE?

A first order differential equation involves only the first derivative of a function, while a second order differential equation involves the second derivative. This means that a second order DE requires more information about the function and its behavior to solve.

3. What are some examples of real-world applications of second order DEs?

Second order differential equations are commonly used to model oscillatory systems, such as a mass-spring system or a pendulum. They are also used in heat transfer, population growth, and electrical circuits.

4. How do you solve a second order DE?

The general solution to a second order DE involves finding two linearly independent solutions and then combining them with arbitrary constants. This can be done through methods such as separation of variables, variation of parameters, or using Laplace transforms.

5. What is the significance of the initial conditions in solving a second order DE?

The initial conditions, also known as boundary conditions, are necessary for finding the specific solution to a second order DE. They provide information about the behavior of the function at specific points and help determine the values of the arbitrary constants in the general solution.

Similar threads

  • Calculus and Beyond Homework Help
Replies
10
Views
535
  • Calculus and Beyond Homework Help
Replies
3
Views
852
  • Calculus and Beyond Homework Help
Replies
19
Views
820
  • Calculus and Beyond Homework Help
Replies
8
Views
799
  • Calculus and Beyond Homework Help
Replies
20
Views
494
  • Calculus and Beyond Homework Help
Replies
5
Views
670
  • Calculus and Beyond Homework Help
Replies
2
Views
585
  • Calculus and Beyond Homework Help
Replies
3
Views
399
  • Calculus and Beyond Homework Help
Replies
6
Views
900
  • Calculus and Beyond Homework Help
Replies
4
Views
739
Back
Top