Calculus · real student question

Solve the differential equation (x + y + 1) dx + (2x + 2y + 5) dy = 0.

Question

Solve

(x+y+1)dx+(2x+2y+5)dy=0(x+y+1)\,dx+(2x+2y+5)\,dy=0

Step-by-step solution

  1. Test for exactness before anything else. Write M=x+y+1M=x+y+1 and N=2x+2y+5N=2x+2y+5. Then

    My=1,Nx=2\frac{\partial M}{\partial y}=1,\qquad \frac{\partial N}{\partial x}=2

    These differ, so the equation is not exact and there is no potential function to read off directly.

  2. Spot the structural clue. Both coefficients are functions of the single combination x+yx+y:

    M=(x+y)+1,N=2(x+y)+5M=(x+y)+1,\qquad N=2(x+y)+5

    Whenever an equation depends on xx and yy only through x+yx+y, the substitution u=x+yu=x+y reduces it to a separable equation in uu and xx.

  3. Change variables. Put u=x+yu=x+y, so y=uxy=u-x and dydx=dudx1\dfrac{dy}{dx}=\dfrac{du}{dx}-1. Dividing the original equation by dxdx and solving for yy',

    dydx=x+y+12x+2y+5=u+12u+5\frac{dy}{dx}=-\frac{x+y+1}{2x+2y+5}=-\frac{u+1}{2u+5}

    so

    dudx1=u+12u+5  dudx=2u+5(u+1)2u+5=u+42u+5\frac{du}{dx}-1=-\frac{u+1}{2u+5}\ \Longrightarrow\ \frac{du}{dx}=\frac{2u+5-(u+1)}{2u+5}=\frac{u+4}{2u+5}

  4. Separate and split the improper fraction. Moving everything in uu to one side,

    2u+5u+4du=dx,2u+5u+4=2(u+4)3u+4=23u+4\frac{2u+5}{u+4}\,du=dx,\qquad \frac{2u+5}{u+4}=\frac{2(u+4)-3}{u+4}=2-\frac{3}{u+4}

    Rewriting as "polynomial plus proper fraction" is what makes the left side integrable in closed form.

  5. Integrate both sides.

    (23u+4)du=dx  2u3lnu+4=x+C\int\left(2-\frac{3}{u+4}\right)du=\int dx\ \Longrightarrow\ 2u-3\ln|u+4|=x+C

  6. Substitute back and tidy. With u=x+yu=x+y,

    2(x+y)3lnx+y+4=x+C  x+2y3lnx+y+4=C2(x+y)-3\ln|x+y+4|=x+C\ \Longrightarrow\ x+2y-3\ln|x+y+4|=C

  7. Verify by implicit differentiation. For F=x+2y3lnx+y+4F=x+2y-3\ln|x+y+4|,

    Fx=13x+y+4,Fy=23x+y+4F_{x}=1-\frac{3}{x+y+4},\qquad F_{y}=2-\frac{3}{x+y+4}

    and FxNFyM=0F_{x}N-F_{y}M=0 identically (checked numerically at (0.5,1.2)(0.5,1.2), (2,0.3)(2,-0.3) and (1,3)(-1,3) to machine precision), so the level curves of FF are exactly the solution curves. Equivalently, Fx/M=Fy/N=1x+y+4F_{x}/M=F_{y}/N=\dfrac{1}{x+y+4}, showing μ=1x+y+4\mu=\dfrac{1}{x+y+4} is the integrating factor hidden behind the substitution.

Answer

x+2y3lnx+y+4=Cx+2y-3\ln|x+y+4|=C

Need to solve a different problem like this? Open the solver →