Calculus · real student question

Solve the differential equation dy/dx + sqrt(1 + (dy/dx)^2) = e^x.

Question

Solve

dydx+1+(dydx)2=ex\frac{dy}{dx}+\sqrt{1+\left(\frac{dy}{dx}\right)^{2}}=e^{x}

Step-by-step solution

  1. Replace the derivative by a single symbol. Put p=dydxp=\dfrac{dy}{dx}, so the equation reads

    p+1+p2=exp+\sqrt{1+p^{2}}=e^{x}

    Notice yy itself never appears: the equation determines pp algebraically at each xx, and only then is one integration needed. This is the whole reason such an equation is tractable.

  2. Isolate the radical before squaring. Squaring the equation as it stands would leave a cross term; isolating first avoids that:

    1+p2=exp\sqrt{1+p^{2}}=e^{x}-p

    For the square root to be non-negative we need expe^{x}\ge p, a condition to confirm at the end.

  3. Square and watch p2p^{2} cancel.

    1+p2=e2x2exp+p2  1=e2x2exp1+p^{2}=e^{2x}-2e^{x}p+p^{2}\ \Longrightarrow\ 1=e^{2x}-2e^{x}p

    The quadratic terms disappear, leaving a linear equation for pp — this cancellation is what makes the problem solvable in closed form.

  4. Solve for pp and recognise the hyperbolic sine.

    2exp=e2x1  p=e2x12ex=exex2=sinhx2e^{x}p=e^{2x}-1\ \Longrightarrow\ p=\frac{e^{2x}-1}{2e^{x}}=\frac{e^{x}-e^{-x}}{2}=\sinh x

  5. Integrate once.

    y=sinhxdx=ex+ex2+C=coshx+Cy=\int\sinh x\,dx=\frac{e^{x}+e^{-x}}{2}+C=\cosh x+C

    A single arbitrary constant is correct for a first-order equation.

  6. Check the solution and the squaring condition. With p=sinhxp=\sinh x: p+1+sinh2x=sinhx+coshx=exp+\sqrt{1+\sinh^{2}x}=\sinh x+\cosh x=e^{x} ✓ (using cosh2sinh2=1\cosh^{2}-\sinh^{2}=1 and coshx>0\cosh x>0). The condition exp=coshx>0e^{x}-p=\cosh x>0 holds for all xx, so squaring introduced no spurious solution. Numerically at x=2x=2: sinh2+cosh2=3.6269+3.7622=7.3891=e2\sinh 2+\cosh 2=3.6269+3.7622=7.3891=e^{2} ✓.

Answer

y=coshx+C=ex+ex2+Cy=\cosh x+C=\frac{e^{x}+e^{-x}}{2}+C

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