Calculus · real student question

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

Question

Solve

dydx+2y=e3x\frac{dy}{dx}+2y=e^{3x}

Step-by-step solution

  1. Confirm the standard first-order linear form. With y+P(x)y=Q(x)y'+P(x)y=Q(x) we read

    P(x)=2,Q(x)=e3xP(x)=2,\qquad Q(x)=e^{3x}

    Only QQ differs from the exe^{-x} version of this problem, so the machinery is identical and only the final integral changes.

  2. Compute the integrating factor from PP alone. Because μ\mu depends only on PP, the forcing term e3xe^{3x} has no say here:

    μ(x)=e2dx=e2x\mu(x)=e^{\int 2\,dx}=e^{2x}

  3. Multiply through so the left side becomes one derivative.

    e2xdydx+2e2xy=e2xe3x=e5xe^{2x}\frac{dy}{dx}+2e^{2x}y=e^{2x}e^{3x}=e^{5x}

    ddx(e2xy)=e5x\frac{d}{dx}\left(e^{2x}y\right)=e^{5x}

    Note the exponents add: this is why the right side is e5xe^{5x} and not e3xe^{3x}.

  4. Integrate, using ekxdx=ekx/k\int e^{kx}dx=e^{kx}/k. Here k=5k=5, so the 1/51/5 that ends up in the final answer is born at this step:

    e2xy=15e5x+Ce^{2x}y=\frac{1}{5}e^{5x}+C

  5. Divide by e2xe^{2x} and simplify the exponents.

    y=15e5x2x+Ce2x=15e3x+Ce2xy=\frac{1}{5}e^{5x-2x}+Ce^{-2x}=\frac{1}{5}e^{3x}+Ce^{-2x}

  6. Check by direct substitution. From y=15e3x+Ce2xy=\tfrac15 e^{3x}+Ce^{-2x}, y=35e3x2Ce2xy'=\tfrac35 e^{3x}-2Ce^{-2x}, so

    y+2y=(35+25)e3x+(2C+2C)e2x=e3xy'+2y=\left(\tfrac35+\tfrac25\right)e^{3x}+(-2C+2C)e^{-2x}=e^{3x}

    The coefficient check 35+25=1\tfrac35+\tfrac25=1 is the part worth doing by hand — a wrong 1/51/5 would show up immediately.

Answer

y=15e3x+Ce2xy = \frac{1}{5}e^{3x} + Ce^{-2x}

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