Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Roam DE thread.

  1. Jun 18, 2008 #1

    I was looking at the differential equation [tex](x^2 + 1) \frac{dy}{dx} + xy = 0[/tex].
    This solution to this equation has to be [tex]y = \frac{c}{\sqrt{x^2 +1}}[/tex]

    So, when do we usually need to use the method of integrating factor? Can we solve all linear equations (1st order) using this method?

    Because in this example I used the method of separation of variables and I arrived at the correct answer!

    [tex](x^2 + 1) \frac{dy}{dx} + xy = 0[/tex]

    [tex]\frac{dy}{dx} + xy = \frac{1}{(x^2 + 1)} [/tex]

    [tex]\frac{1}{y} dy = \frac{1}{(x^2 + 1)} -xy dx[/tex]

    [tex]\frac{1}{y} = \frac{-x}{(x^2 + 1)}[/tex]

    [tex]\int \frac{1}{y} = \int \frac{-x}{(x^2 + 1)}[/tex]

    [tex] y = - \frac{1}{2} ln (x^2 + 1) + ln c[/tex] = [tex] ln \frac{c}{\sqrt{x^2 +1}}[/tex]

    & it follows that [tex]y = \frac{c}{\sqrt{x^2 +1}}[/tex]!!

    But how do we get the same answer using the method of integrationg factor?

    [tex](x^2 + 1) \frac{dy}{dx} + xy = 0[/tex].

    Since it is in the form [tex]P(x) \frac{dy}{dx} + Q(x)y = R(x)[/tex], we get it in the form [tex]\frac{dy}{dx} + p(x)y = q(x)[/tex];

    [tex]\frac{dy}{dx} + xy = \frac {1}{x^2 +1)}[/tex];

    [tex]\mu = e^{\int p(x) dx}[/tex] so, since the p(x) is just x, then ∫x = 1/2x^2
    yields => [tex]e^{\frac{x^2}{2}}[/tex]
    Multiplying both sides of the equation by the integrating factor;

    [tex]\frac{d}{dx} + e^{\frac{x^2}{2}}y = \frac {1}{x^2 +1)} . e^{\frac{x^2}{2}}[/tex]

    Did I do it correctly so far? How do we do this question using an integrating factor?

    Last edited: Jun 18, 2008
  2. jcsd
  3. Jun 18, 2008 #2


    User Avatar
    Homework Helper

    [tex](x^2 + 1) \frac{dy}{dx} + xy = 0[/tex]


    and p(x)=x/x^2+1
  4. Jun 18, 2008 #3
    Well, thank you, but how did you get from [tex](x^2 + 1) \frac{dy}{dx} + xy = 0[/tex] to [tex]\frac{dy}{dx}+\frac{x}{x^2+1}y=0[/tex].....?

    We had to devide through by [tex]x^2 +1[/tex] in order to make the coefficient of dy/dx equal to 1. But don't we need to devide the other side by it as well? i.e., [tex]\frac{dy}{dx} + xy = \frac {1}{(x^2 +1)}[/tex]?!

    But if [tex]p(x)= \frac{x}{x^2 +1}[/tex] , we need to find [tex]\int \frac{x}{x^2 +1} dx[/tex]

    Integrating that gives [tex]\frac{1}{2} ln (x^2 + 1) = ln \sqrt{x^2 +1}[/tex]
    Is [tex]e^{ln\sqrt{x^2 +1}}[/tex] the integrating factor?

    I'm confused with that...
    Last edited: Jun 18, 2008
  5. Jun 18, 2008 #4


    User Avatar
    Homework Helper

    the equation is


    if you divide by (x^2+1), the right side is still 0

    Yeah that is the integrating factor.

    then recall that


    so your integrating factor,reduces to [itex]\sqrt{x^2+1}[/itex]
  6. Jun 19, 2008 #5
    Yes, of course. :smile:

    All that remains is to multiply both sides of the equation by the µ;

    The integrating factor is [tex]e^{ln \sqrt{x^2 +1}}[/tex] => [itex]\sqrt{x^2+1}[/itex],

    As we should multiply through by the integrating factor the overall effect is to devide through by [itex]\sqrt{x^2+1}[/itex],

    It'd would it be like:
    [tex]\frac{1}{\sqrt{x^2 +1}}\frac{dy}{dx} + \frac{1}{\sqrt{x^2 +1}} .xy = 0[/tex]

    .·. [tex]\frac{1}{\sqrt{x^2 +1}}\frac{dy}{dx} + \frac{x}{\sqrt{x^2 +1}} y = 0[/tex]

    I don't know if this is right, (please correct me if I'm wrong), I know that there is a formula for this that goes like; [tex]y = \frac{1}{\mu} \int \mu q(x) dx[/tex] but in this case I'm not sure~

  7. Jun 20, 2008 #6


    User Avatar
    Staff Emeritus
    Science Advisor

    Any linear order differential equation has an integrating factor but there is no general method for finding it.

    Any linear first order equation, like the one you give, has an integrating factor given by a simple formula. An integrating factor for the linear equation dy/dx+ p(x)y= q(x) is given by
    [tex]e^{\int p(x)dx}[/tex]

    By the way, any linear homogeneous first order differential equation, again, what you have here, is separable. You can integrate that as
    [tex]\frac{dy}{y}= -\frac{xdx}{x^2+ 1}[/itex]
    Last edited: Jun 21, 2008
  8. Jun 20, 2008 #7

    Yes, I know. As you see in my first post I did solve this equation by separation of variables but I am rather curious as how to get the same solution using an integrating factor.

    Anyway, I did find the integrating factor i.e., [tex]\mu = e^{\int p(x) dx}[/tex]; it's [itex]\sqrt{x^2+1}[/itex];

    [tex](x^2 + 1) \frac{dy}{dx} + xy = 0[/tex]
    So the integrating after deviding through by [tex]x^2 + 1[/tex] (to make the coefficient of dy/dx = 1) is [tex]e^{ln\sqrt{x^2 +1}}[/tex] = [itex]\sqrt{x^2+1}[/itex]

    Now we have to multiply both sides by this integrating factor and I attempt at it before and that's where I'm stuck...

    Would it be something like: [tex]\frac{1}{\sqrt{x^2 +1}}\frac{dy}{dx} + \frac{x}{\sqrt{x^2 +1}} y = 0[/tex] ?

    Last edited: Jun 20, 2008
  9. Jun 20, 2008 #8
    [itex]\sqrt{x^2+1}[/itex] is the integrating factor for the equation [itex]\frac{dy}{dx} + \frac{xy}{x^2+1} = 0[/itex] that you get after you divide the original equation through by [itex]x^2 + 1[/itex]. You have to multiply that equation by [itex]\sqrt{x^2+1}[/itex], not the original one.
  10. Jun 21, 2008 #9
    Thanks for your message!

    Yes, I made a slight error. So, multiplying [itex]\frac{dy}{dx} + \frac{xy}{x^2+1} = 0[/itex] by [itex]\sqrt{x^2+1}[/itex] we get;

    [tex]\sqrt{x^2 +2}\frac{dy}{dx} + \sqrt{x^2 +1}. \frac{x}{x^2 +1}y = 0[/tex]

    So, is that it? What else do we need to do in order to finish the job?
    Last edited: Jun 21, 2008
  11. Jun 22, 2008 #10


    User Avatar
    Homework Helper

    you then integrate both sides of the equation.

    Noticing that the left side will always become [itex]y \mu[/itex] because the left side is actually:

    [tex]\frac{d}{dx}(y \sqrt{x^2+2})[/tex]
  12. Jun 22, 2008 #11

    Errr..... I don't understand how you got from [tex]\sqrt{x^2 +2}\frac{dy}{dx} + \sqrt{x^2 +1}. \frac{x}{x^2 +1}y = 0[/tex] to [tex]\frac{d}{dx}(y \sqrt{x^2 +1}) = 0[/tex] per se.

    I appreciate that if you could show me how you got the left side like that.

    Yes, we do have [itex]y \mu[/itex] on the left, but what happens to the rest of the stuff? I'm confused...

    But I'm pretty sure it's right, since [tex]y \sqrt{x^2 +1}[/tex] it's a constant, say c, from which we can get the correct answer, [tex]y = \frac{c}{\sqrt{x^2 +1}}[/tex].

    Thanks a lot. :smile:
    Last edited: Jun 22, 2008
  13. Jun 22, 2008 #12


    User Avatar
    Homework Helper

    ah I have too many typos with 2s being 1s...so I'll start over.
    We have to solve

    [tex](x^2 + 1) \frac{dy}{dx} + xy = 0[/tex]

    Dividing by [itex] x^2+1[/itex] we now get:


    which is in the form [itex]\frac{dy}{dx}+P(x)y=Q(x)[/itex]
    where [itex]P(x)=\frac{x}{x^2+1}[/itex]
    and [itex]Q(x)=0[/itex]

    So our integrating factor,[itex]\mu[/itex] is [itex]e^{\int P(x) dx}[/itex]

    [tex]\int P(x) dx= \int \frac{x}{x^2+1} dx = \frac{1}{2}ln(x^2+1)[/tex]

    hence our integrating factor is

    [tex]\mu = e^{\frac{1}{2}ln(x^2+1)}=\sqrt{x^2+1}[/tex]

    Now, to the equation in the form [itex]\frac{dy}{dx}+P(x)y=Q(x)[/itex] we multiply both sides by [itex]\mu[/itex]

    [tex]\sqrt{x^2+1} \frac{dy}{dx}+ \sqrt{x^2+1}(\frac{x}{x^2+1})y=0(\sqrt{x^2+1})[/tex]

    Now we integrate both sides of this equation with respect to x

    [tex]\int (\sqrt{x^2+1} \frac{dy}{dx}+ \sqrt{x^2+1}(\frac{x}{x^2+1})y) dx= \int 0 dx[/tex]

    Looks hard right? It's not. The integrand of the left side is actually a product

    [tex]\sqrt{x^2+1} \frac{dy}{dx}+ \sqrt{x^2+1}(\frac{x}{x^2+1})y =\frac{d}{dx}(y \sqrt{x^2+1})[/tex]

    and when you integrate the differential of "something",you just get the "something".

    So,after you multiply by the integrating factor and then integrate both sides w.r.t. x, the left side will always become [itex]y \mu[/itex], and you just now deal with the right side.

    so you now have

    [tex] y \sqrt{x^2+1}= \int 0 dx[/tex]

    which is [itex]y \sqrt{x^2+1}= C[/itex]
  14. Jun 24, 2008 #13
    Thanks. That makes perfect sense now, except;

    In the equation [tex]\frac{dy}{dx} + 4y = e^{-3x}[/tex], which is already in the form [itex]\frac{dy}{dx}+P(x)y=Q(x)[/itex],

    [tex]\mu = e^{\int P(x) dx}[/tex]

    [tex]P(x) = 4[/tex] [tex]=> e^{4x}[/tex]

    [tex]e^{4x} \frac{dy}{dx} + e^{4x} (4y) = e^{-3x} . e^{4x}[/tex]

    [tex]\int e^{4x} \frac{dy}{dx} + e^{4x} (4y) = \int e^{-3x} . e^{4x}[/tex]

    The way it looks atm, I am not sure, would the left side be [tex]y (e^{4x})[/tex] (?) - "?"

    Last edited: Jun 24, 2008
  15. Jun 24, 2008 #14


    User Avatar
    Homework Helper

    yep. the left side is ye^4x.

    You just deal with the right side now.
  16. Jun 25, 2008 #15
    That's a no brainer! :wink: I get it!

    And about the right side...
    [tex] y (e^{4x}) = \int e^{-3x} . e^{4x}[/tex]

    Do you think I should just try integrating it with respect to x, using the method of integration by parts since it's in the form [tex]\int f(x) g(x) dx[/tex]? *and* then devide the whole thing by [tex]e^{4x}[/tex]? .......so that we get y = ...

    Do you think that would work? ~~

    Thanks for the tips.
  17. Jun 25, 2008 #16


    User Avatar
    Homework Helper

    No need for integration by parts when you know the rules of indices.

    remember that [itex] a^m \times a^n =a^{m+n[/itex] in your integral...'a' is 'e' ,m=-3 and n=4
  18. Jun 25, 2008 #17
    my bad my bad...

    Yes, I knew the rules of indices, so [tex]e^{-3x} \times e^{4x} = e^x[/tex]
    and [tex] \int e^x = e^x + c[/tex]

    Now we have [tex] y (e^{4x}) = e^{x}[/tex] so we have to devide both sides by e^4x.

    But that surely wouldn't produce the right answer. The right answer has to be [tex]y = e^{-3x} + Ce^{-4x}[/tex], something like that.
    I don't know, what do you reckon is wrong here? :rolleyes:
  19. Jun 25, 2008 #18


    User Avatar
    Homework Helper

    You forgot to add the constant of integration so you'd have e^x + C which would give the correct answer.
  20. Jun 26, 2008 #19


    User Avatar
    Homework Helper
    Gold Member

    I may have misunderstood the intent but if it is just about solving this equation it seems to me making a big meal of something fairly easy to solve.

    [tex](x^2 + 1) \frac{dy}{dx} + xy = 0[/tex]


    [tex]\frac{1}{y}. \frac{dy}{dx} = -\frac{x}{(x^2 + 1)} [/tex]

    [tex]\frac{d ln y}{dx} = -\frac{1}{2}.\frac{d ln(x^2 + 1)}{dx} [/tex]

    and the rest is easy
  21. Jun 26, 2008 #20


    User Avatar
    Homework Helper

    The OP solved it using "variables are separable" method but wanted to solve it using the integrating factor method.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Roam DE thread.
  1. Is this DE linear? (Replies: 3)

  2. A doubt in the DE (Replies: 1)

  3. Constructing a DE (Replies: 3)

  4. DE question (Replies: 3)