Variation of Parameters Calculator
Type ay'' + by' + cy = g(x) with constant coefficients, such as y'' + y = sec(x), to solve it.
Write y' and y'' (or dy/dx and d^2y/dx^2): y' + 2y = 4 or y'' - 3y' + 2y = 0. Type powers with ^ and functions with brackets: e^x, sin(x), ln(x).
Optional: two conditions at the same point, such as y(0) = 0, y'(0) = 1. Leave empty for the general solution, with C1 and C2.
Result
You entered
Show the work
Type of equation
This is a second-order linear equation with constant coefficients and a right side g(x); variation of parameters works for any g(x) whose integrals can be found.
Second-order linear equation
The equation has constant coefficients: with and .
Characteristic equation
Try : it solves exactly when is a root of the characteristic equation.
Using
Complex roots
, so the roots are with and ; the real solutions are and .
Using
Variation of parameters
Look for with the solutions of the homogeneous equation and unknown functions.
Using
Wronskian
The Wronskian of and is .
u1' = -y2 g/W and u2' = y1 g/W
Divide by first so the equation reads ; then solve for the derivatives of and .
Integrate
Integrate each (no constant is needed: constants are already in the homogeneous part).
Assemble the solution
Add the particular solution to the homogeneous one: .
Result
The general solution, with arbitrary constants.