Differential Equation Calculator

Write the derivative as y' or dy/dx, and the second derivative as y'' or d^2y/dx^2.
Leave blank for the general solution with its arbitrary constant.
Second-order equations need this as well to pin both constants.
Needs initial conditions, so that the constants are known.
General solution
y = 2 + c * exp(-2 * x)
Differential Equation Calculator
Kind of equation
first-order linear with constant coefficients
Order
1
How it was solved
exact: integrating factor
Checked by substituting back
yes - substituted back into the equation
Worked out from OpenStax, Calculus Volume 2, chapter 4: Introduction to Differential Equations (separable equations and first-order linear equations) and 2 other sources.
Without an initial condition the answer keeps its arbitrary constant.

How this is worked out

5 steps
  1. Read as 0 y'' + 1 y' + 2 y = 4.
  2. Written in standard form: y' + (2) y = 4
  3. Integrating factor μ = exp(∫2 dx) = exp(2x). Multiplying through and integrating gives y = 4/2 + C exp(-2x).
  4. General solution: y = 2 + c * exp(-2 * x)
  5. Check: substituting this back into the equation leaves a residual of essentially zero.

Results are general information, not financial, tax, legal, medical or engineering advice.