Results 1 to 6 of 6

Math Help - first order differential equation

  1. #1
    Member
    Joined
    Oct 2006
    Posts
    81

    first order differential equation

    Solve for dy/dx+y/x=1/x

    I'd like to see the correct way to solve it. I did it a ridiculous way and ended up with the answer, but I don't want to spend so much time next time.

    General formula is y=e^-(P(x)dx)*int[(Q(x)e^(P(x)dx)dx], no?

    P(x)y=y/x so P(x)=1/x
    Q(x)=1/x so Q(x)=1/x as well
    the integrating factor is = e^int[(P(x)dx)] = e^int[1/x] = e^[ln(x)] = x ... right?

    I should just be able to plug in and solve, right?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by thedoge View Post
    Solve for dy/dx+y/x=1/x

    I'd like to see the correct way to solve it. I did it a ridiculous way and ended up with the answer, but I don't want to spend so much time next time.

    General formula is y=e^-(P(x)dx)*int[(Q(x)e^(P(x)dx)dx], no?

    P(x)y=y/x so P(x)=1/x
    Q(x)=1/x so Q(x)=1/x as well
    the integrating factor is = e^int[(P(x)dx)] = e^int[1/x] = e^[ln(x)] = x ... right?

    I should just be able to plug in and solve, right?
    It's of variables seperable type.

    \frac{dy}{dx}=\frac{1}{x}(1-y)

    so:

    \int \frac{1}{(1-y)} \,dy=\int \frac{1}{x}\,dx

    -\ln(1-y)=\ln(x) + C

    so:

    y=1+A/x

    RonL

    RonL
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by thedoge View Post
    Solve for dy/dx+y/x=1/x
    This is first order linear differencial equation, solves easily.

    You have,
    y'+\frac{y}{x}=\frac{1}{x}
    We want to solve this on some open interval excluding zero.

    The integrating factor is,
    \exp \left( \int \frac{1}{x} dx \right)=\exp (\ln |x|)=|x|
    I will assume the interval is (0,\infty) in that case,
    |x|=x.

    Thus, the general solution is,
    y=\frac{1}{x} \left( \int x\cdot \frac{1}{x} dx \right)= \frac{1}{x}\left( x+C\right).
    Thus,
    y=1+\frac{C}{x} are all solutions.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Oct 2006
    Posts
    81
    What would need to be done additionally if you had initial conditions where x and y were constants?
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by thedoge View Post
    What would need to be done additionally if you had initial conditions where x and y were constants?
    The initial condition determine the arbitary constant, so if you have initial
    condition y=y_0 at x=x_0, you have:

    A=x_0(y_0-1)

    or if you are ImPerfectHacker:

    C=x_0(y_0-1)

    RonL
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by thedoge View Post
    What would need to be done additionally if you had initial conditions where x and y were constants?
    If the initial condition was,
    y(2)=1
    Then, since,
    y=1+\frac{C}{x}
    We substitute,
    x=2 and y=1.
    Thus,
    1=2+\frac{C}{2}
    Solve,
    C=-2
    And have the solution is,
    y=1-\frac{2}{x}
    Which satisfies this differencial equation.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 2
    Last Post: September 21st 2011, 03:37 PM
  2. Please help with this First Order Differential Equation
    Posted in the Differential Equations Forum
    Replies: 2
    Last Post: January 10th 2010, 09:28 AM
  3. Replies: 2
    Last Post: November 25th 2008, 09:29 PM
  4. First order differential equation
    Posted in the Calculus Forum
    Replies: 9
    Last Post: April 5th 2008, 03:08 PM
  5. second order differential equation help
    Posted in the Calculus Forum
    Replies: 1
    Last Post: March 2nd 2008, 07:11 AM

Search Tags


/mathhelpforum @mathhelpforum