Second Order Inhomogeneous ODE.

  • Thread starter Thread starter Je m'appelle
  • Start date Start date
  • Tags Tags
    Ode Second order
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 2K views
Je m'appelle
Messages
117
Reaction score
0

Homework Statement


Solve the following equation

[tex]f'' - 3f' + 2f = 3[/tex]

For

[tex]f(0) = 0,\ and\ f'(0) = 1[/tex]

Homework Equations



None.

The Attempt at a Solution


Ok, so, I know how to solve inhomogeneous ODEs when it's on this form

[tex]af'' + bf' + cf = g[/tex]

Where [tex]g[/tex] is a given function.

But how do I proceed when I find a constant instead of a function on the right hand side of the equation?

I'm really confused here.
 
Physics news on Phys.org
Ok, so I saw this example in the book

[tex]f'' + f' - 2f = x^2[/tex]

And then the particular solution [tex]f_p[/tex] was found by the following process

[tex]As\ g(x) = x^2\ is\ a\ second\ degree\ polynomial\ we'll\ look\ for\ a\ solution\ like[/tex]

[tex]f_p = Ax^2 + Bx + C[/tex]

Then

[tex]\frac{df_p}{dx} = 2Ax + B,\ \frac{d^2 f_p}{dx^2} = 2A[/tex]

We'll plug-in the derivatives of [tex]f_p[/tex] in the original equation

[tex]f'' + f' - 2f = x^2[/tex]

[tex](2A) + (2Ax + B) - 2(Ax^2 + Bx + C) = x^2[/tex]

[tex]-2Ax^2 + x(2A - 2B) + (2A + B - 2C) = x^2 + 0x + 0[/tex]

Then

[tex]A = \frac{-1}{2},\ B = \frac{-1}{2},\ C = \frac{-3}{4}[/tex]

So,

[tex]f_p = \frac{-x^2}{2} - \frac{x}{2} - \frac{3}{4}[/tex]

And I tried this same method in my original post, by using [tex]3 = 3x^0[/tex], but it did not work.

Please someone help.
 
You are making this much more complicated than it needs to be. Try yp = C. Don't forget that you need to solve the homogeneous problem f'' - 3f' + 2f = 0. The solution to the homogeneous problem, plus the particular solution, will be your general solution.
 
Mark44 said:
You are making this much more complicated than it needs to be. Try yp = C. Don't forget that you need to solve the homogeneous problem f'' - 3f' + 2f = 0. The solution to the homogeneous problem, plus the particular solution, will be your general solution.

Ok, so, by considering [tex]f_p = C[/tex] just as you said, I got [tex]f_p = \frac{3}{2}[/tex], and it worked!

Then the general solution will be:

[tex]f(x) = A_1e^{x} + A_2e^{2x} + f_p[/tex]

[tex]f(x) = A_1e^{x} + A_2e^{2x} + \frac{3}{2}[/tex]

I won't bother you folks showing all the work done to find [tex]A_1[/tex] and [tex]A_2[/tex], but I eventually got to

[tex]A_1 = -4,\ and\ A_2 = \frac{5}{2}[/tex]

[tex]f(x) = -4e^{x} + \frac{5}{2}e^{2x} + \frac{3}{2}[/tex]

Let's verify it by plugging-in the above function in the original equation,

[tex]f'' - 3f' + 2f = 3[/tex]

Where,

[tex]\frac{df(x)}{dx} = -4e^x + 5e^{2x}[/tex]

[tex]\frac{d^2 f(x)}{dx^2} = -4e^x + 10e^{2x}[/tex]

[tex](-4e^x + 10e^{2x}) - 3(-4e^x + 5e^{2x}) + 2(-4e^{x} + \frac{5}{2}e^{2x} + \frac{3}{2}) = 3[/tex]

[tex]-4e^x + 10e^{2x} + 12e^x - 15e^{2x} - 8e^x + 5e^{2x} + 3 = 3[/tex]

[tex](-4e^x + 12e^x - 8e^x) + (10e^{2x} - 15e^{2x} + 5e^{2x}) + 3 = 3[/tex]

Indeed, [tex]3 = 3[/tex]

This is pathetically easy, my god.. I don't even know how or why I complicated it so much.

Thank you very much for your time [tex]LCKurtz[/tex] and [tex]Mark44[/tex].

:approve:
 
They can get much more complicated in a hurry. The best practice is to solve the homogeneous problem first, since the homogeneous solutions can impact your choices for your particular solution.

For example, if the equation had been y'' - y' = 3, your particular solution would NOT have been a constant.