Mathematics

Solve the following differential equation, i.e. solve for y:

dy/dx - y/x = 1/x + y + 1

I have this so far,

1. dy/dx= (y + 1 + xy + x)/x
2. x dy = (y + 1 + xy + x)dx
3. Integrate both sides...
xy + c = xy + x + .5x^2y + .5x^2 + k
where c and k are constants
4. c = x + .5x^2 (y + 1) + k
5. .5x^2 (y + 1) = c - k -x
6. y = 2(C- x)x^-2 - 1
where C = c - k

but I have been told this is wrong. so can soneone please direct me in the error of my method and show me the correct working out.

  1. 👍 0
  2. 👎 0
  3. 👁 51
  1. What is wrong is this: In step 3, you cannot treat x as a constant in the dy integration (on the left), nor can your treat y as a constant in the dy integration (on the right). You need to totally separate y and x variables on opposite sides somehow, or find some other trick.

    This is a first order linear differential equation that can be written as
    dy/dx - Py = Q
    where P and Q are functions of x.
    Equations of this type can be solved by the "integrating factor" method. I suggest you familiarize yourself with the method. It goes like this:
    Compute the function
    rho(x) = exp(integral of P dx)
    The solution will be
    rho*y = [Integral of rho*Q(x)dx] + C

    1. 👍 0
    2. 👎 0
    posted by drwls
  2. I should have written the standard form as dy/dx + P(x)y = Q(x)
    I got the sign wrong on the P.
    In your case, Q = -P = (1/x) + 1
    The form of the solution which I wrote should be correct.

    1. 👍 0
    2. 👎 0
  3. For the first step, I get
    rho(x) = 1/(x*e^x)

    The final step would be to solve
    y(x) = (x*e^x)*(Integral)[(1/x^2)*e^-x + (1/x)*e^-x] dx + C

    1. 👍 0
    2. 👎 0
    posted by drwls
  4. Yes, I worked it through mostly the same way and got
    y = c x e^x - 1

    1. 👍 0
    2. 👎 0
    posted by Damon
  5. By the way, having gotten interested, I also solved this by brute force trial and error.
    I assumed an exponential type solution:
    y = Ae^x + Bxe^x+ C
    then
    dy/dx = Ae^x + Bxe^x + Be^x
    plug that in
    Ae^x + Bxe^x + Be^x - Ae^x/x - Be^x - C/x = 1/x + 1 + Ae^x + Bxe^x+ C
    combine like terms
    -Ae^x/x - C/x = 1/x + 1+ C
    then
    -Ae^x -C = 1 + x + Cx
    well now, A = 0 because we have no other term in e^x
    C(x+1)= -(x+1)
    so
    C = -1
    B can be any constant
    so
    y = B e^x - 1
    same answer

    1. 👍 0
    2. 👎 0
    posted by Damon
  6. Whoops, correct last line
    y = B xe^x - 1

    1. 👍 0
    2. 👎 0
    posted by Damon

Respond to this Question

First Name

Your Response

Similar Questions

  1. PLEEEEEAAAASE HELP WITH DIFFERENTIAL EQ PROBLEMS!!

    1) What are the equilibrium solutions to the differential equation and determine if it is stable or unstable with the initial condition y(-4)=1: 0.1(y+2)(4-y) 2) Use Euler's method with step size=0.5 and initial condition y(0)=3

    asked by Karen on December 8, 2014
  2. Calculus

    Solve the differential equation dy/dx = -xe^y and determine the equation of the curve through P(1,2) I tried solving the differential equation and I get y = log(x^2/2 + C). Is this correct? Now I forgot how to find the equation.

    asked by Robert on August 6, 2012
  3. Calculus

    Using separation of variables, solve the following differential equation with initial conditions dy/dx = e^(2x+3y) and y(0) = 1. Hint: use a property of exponentials to rewrite the differential equation so it can be separated

    asked by Nick on August 14, 2018
  4. Calculus AB

    Solve the differential equation: dy/dx= (x^2+y^2)/(2xy) I know how to solve this type of problem, but I am struggling getting all of the x's and y's on different sides of the equation. Thank you for your help.

    asked by Jake on February 28, 2011
  5. maths

    how would i solve the differential equation dx/dt=-kx^2 i.e. solve for x as a function of t. I've been told to rearrange the equation to yield dx/x^2=-k dt but what can and should I do now?

    asked by xX_Supaman_Xx on December 14, 2007
  6. maths

    Solve the following differential equation: (1 + x)*(dy/dx) = y where y is a funtion of X solve by the following: A)series expansion B) elemantary method please show working

    asked by ryan on November 30, 2011
  7. mathematics

    Solve the following differential equation: (1 + x)*(dy/dx) = y where y is a funtion of X solve by the following by: A)series expansion B) elemantary method please show working

    asked by ryan on November 30, 2011
  8. maths

    Solve the following differential equation: (1 + x)*(dy/dx) = y where y is a funtion of X solve by the following: A)series expansion B) elemantary method please show working

    asked by Rikki on November 29, 2011
  9. math

    The displacement s (in metres) of a body in a damped mechanical system, with no external forces satisfies the following differential equation: 6 3 2 2    dt ds dt d s where t represents time in seconds. If at time t = 0,

    asked by Karl Haxell on May 17, 2011
  10. Help! Calculus

    I am so confused on how to solve this problem. I have it set up with y's on one side and x's on the other but I don't know what to do from there. Question: Solve the differential equation. The initial condition is y(0) = 1.

    asked by Lucy on February 1, 2017

More Similar Questions