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

Solution of First Order DE using Integrating Factors

  1. Jun 17, 2007 #1
    Hello everyone

    I'm stuck with a problem from Simmons (not HW). The problem asks to solve the following equation by finding an integrating factor

    [tex](xy-1)dx + (x^2 - xy)dy = 0[/tex]

    I found by hit and trial that there can be no integrating factor that is a function of [itex]x[/itex] alone or [itex]y[/itex] alone. So how do I find an integrating factor for this equation? Any ideas?

  2. jcsd
  3. Jun 17, 2007 #2
    I'm not sure that integrating factors will be of any use here. But you can still solve it, i.e. by making the substitution

    [tex]y = x + \sqrt{v} [/tex]

    this will give you

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

    which reduces to

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

    leaving you

    [tex]v(x) = x^2 - 2 \ln{x} + C[/tex]

    where C is a constant. Feed this back into y to get

    [tex]y(x) = x + \sqrt{x^2 - 2 \ln{x} + C}[/tex].
    Last edited: Jun 17, 2007
  4. Jun 17, 2007 #3
    Thanks Matthew, interesting method.

    I wonder why the questions asks to find an integrating factor though.
  5. Jul 21, 2007 #4
    There is no obvious integrating factor, but there is one. If my understanding is correct, the problem you are given is worded wrong. You need to treat this problem as an Exact/Not Exact problem. Here's how you solve it:

    [tex]M = (xy-1)[/tex]
    [tex]N = (x^2 - xy)[/tex]

    Now take the partial with respect to y of M, and the partial with respect to x of N:

    [tex]M_y = x[/tex]
    [tex]N_x = 2x - y[/tex]


    [tex]M_y[/tex] is not equal to [tex]N_x[/tex], this equation is NOT exact, so you must find an integrating factor that makes it exact.
    Check if the integrating factor can be only a function on x:

    [tex]\frac{M_y - N_x}{N}\mu = \frac{d\mu}{dx}[/tex]

    Plugging in the corresponding values, you get:

    [tex]\frac{x - 2x +y}{x^2-xy}\mu = \frac{d\mu}{dx}[/tex]

    [tex]\frac{-x +y}{-x ( -x + y )}\mu = \frac{d\mu}{dx}[/tex]

    [tex]-\frac{1}{x}\mu = \frac{d\mu}{dx}[/tex]

    [tex]-\frac{1}{x}dx = \frac{d\mu}{\mu}[/tex]

    [tex]-\ln(x) = \ln(mu)[/tex]

    [tex]e^{-\ln(x)} = e^{\ln(\mu)}[/tex]

    [tex]\mu = \frac{1}{x}[/tex]

    Now multiply both sides of the equation by the integrating factor:

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

    Now check again if the equation is exact ( it must be, but just to make sure ):

    [tex]M = y-\frac{1}{x}[/tex]
    [tex]N = x - y[/tex]

    [tex]M_y = 1[/tex]
    [tex]N_x = 1[/tex]

    Now it's exact:

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

    [tex]\int(1) dx[/tex]
    [tex](3)\int y-\frac{1}{x} = xy - \ln{x} + h(y)[/tex]

    Now differentiate [tex](3)[/tex]:

    [tex](**)\frac{d}{dy}(y - \ln{x} + h(y)) = 1 + h\prime(y)[/tex]

    Set [tex](2) = (**)[/tex] :

    [tex]x - y = 1 + h\prime(y)[/tex]
    [tex]h\prime(y) = x - y -1[/tex]

    Since [tex]h\prime(y) = x - y -1[/tex],

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

    Now plug in [tex]h(y)[/tex] into [tex](3)[/tex]:

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


    [tex]xy - \ln{x} + xy - \frac{1}{2}y^2 - y = C[/tex]

    is a constant solution. I tried separating y from everything, but it looks nasty. Here, i'll post it anyway:

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

    I hope I didn't mess up anywhere, it took sometime to type.
    Hopefully this helps. Good Luck!
  6. Aug 2, 2007 #5
    Answer given by the following online ODE solver at


    i) integrating factor is 1/x
    ii) possible solution set
    {y=sqrt( - 2*log(x) - 2*cte + x ^2) + x, y=-sqrt( - 2*log(x) - 2*cte + x ^2) + x}
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Solution of First Order DE using Integrating Factors
  1. First Order DE (Replies: 2)