Second-Order Differential Equation Calculator: a y'' + b y' + c y = F with Initial Conditions

Solve a y'' + b y' + c y = F step by step.

Calculated from standard textbook formulas, with every step shown. The formulas are fixed, so the working does not need checking: what matters is the numbers you type in. Use these calculators only if you are competent to choose the inputs (loads, material strength, dimensions, supports) and check your units and assumptions. For learning and checking your own working: design and sign-off are for a qualified engineer. Drafting Central does not store the numbers you type.

How this calculator works

Enter a, b, c and the constant on the right.

Enter the starting value and slope.

The calculator gives the roots, the solution, the value at a time and a graph.

Formulas used

  • ar^2 + br + c = 0
  • y = C_1e^{r_1t} + C_2e^{r_2t} + y_p
  • y_p = \frac{F}{c}

Worked example

With the default numbers in the calculator above:

  1. Roots of the characteristic equation: -1 plus and minus 2 j
  2. Particular solution (the steady value for the constant F): 0
  3. Constants found from the starting conditions: C1 = 1, C2 = 0.5
  4. The solution: y = e^(-1 t) (C1 cos(2 t) + C2 sin(2 t))
  5. Value y at the time you entered: 0.014164
  6. Slope y dash at the time you entered: -0.83628

Change the numbers in the calculator to see the full working, every step, for your own case.

A second worked example

A different case, with these numbers: a (the number in front of y double dash) 1; b (the number in front of y dash) 5; c (the number in front of y) 6; F (the constant on the right-hand side) 12; Starting value y(0) 0; Starting slope y dash (0) 0.

  1. Roots of the characteristic equation: -2 and -3
  2. Particular solution (the steady value for the constant F): 2
  3. Constants found from the starting conditions: C1 = -6, C2 = 4
  4. The solution: y = C1 e^(-2 t) + C2 e^(-3 t) + 2
  5. Value y at the time you entered: 1.38714
  6. Slope y dash at the time you entered: 1.02658

Common questions

How do I solve a second-order linear differential equation?

Find the roots of the characteristic equation, write the general solution for the type of roots, add the particular solution, and use the starting conditions to find the constants.

What do the types of roots mean?

Two different real roots give an over-damped response, a repeated root is critical damping, and complex roots give an oscillation that dies away if the real part is negative.

How does this apply to a mass-spring-damper?

The mass is a, the damping is b, the stiffness is c and a steady force is F. The solution is the position over time.

Related calculators

Got a question about this? Ask an engineering question and get a plain-language answer with references.

Further reading: Any engineering mathematics text (second-order linear differential equations).

Need a calculator we do not have?

Tell us what you would like to calculate. We read every request and build the most asked-for ones.

We store your request (and your email if you give it) to decide what to build. We do not store the numbers you type into calculators.

Embed this calculator on your own page

Copy this code into your page. The calculator runs inside the frame and links back to Drafting Central.

Need this drawn, designed or checked?

Drafting Central is a mechanical engineering and drafting business working with customers across Australia and around the world. A calculator gives you the numbers; we can turn them into drawings and designs.

Need help with a real project?

Talk to Drafting Central →

← All engineering calculators