Calculus · real student question

Solve the differential equation dy/dx = e^y.

Question

Solve

dydx=ey\frac{dy}{dx} = e^{y}

Step-by-step solution

  1. Separate the variables. All the yy dependence is on the right, so divide by eye^{y} — legitimate because eye^{y} is never zero:

    eydy=dxe^{-y}\,dy = dx

  2. Integrate both sides.

    eydy=dxey=x+C0\int e^{-y}\,dy = \int dx \quad\Longrightarrow\quad -e^{-y} = x + C_0

    Only one constant is needed; absorbing the sign, write ey=Cxe^{-y} = C - x with C=C0C = -C_0.

  3. Solve for y explicitly. Taking the natural logarithm requires Cx>0C - x > 0:

    y=ln(Cx)y=ln(Cx)-y = \ln(C - x) \quad\Longrightarrow\quad y = -\ln(C - x)

  4. Read off the domain, which is the interesting part. The solution only exists for x<Cx < C. As xCx \to C^{-} the argument of the log tends to 0+0^{+} and y+y \to +\infty: the solution blows up in finite xx, even though the right-hand side eye^{y} is smooth everywhere. This is the standard example that local existence does not imply global existence.

  5. Check by substitution. With C=5C = 5 and x=1x = 1: y=ln41.386294y = -\ln 4 \approx -1.386294, so ey=14=0.25e^{y} = \tfrac14 = 0.25. Differentiating, dydx=1Cx=14=0.25\frac{dy}{dx} = \frac{1}{C-x} = \frac14 = 0.25. The two agree, and a central difference at x=1x = 1 with step 10610^{-6} also returns 0.2500000.250000.

Answer

y=ln(Cx),x<Cy = -\ln(C - x), \qquad x < C

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