Second Order ODE Solver

Published on: November 16, 2025

This Second Order ODE Solver helps you solve second-order differential equations and shows each step clearly. It can be used to work with common second-order ODE forms, apply suitable solution methods, and optionally use up to two initial conditions to find a particular solution. This makes it useful for checking answers, understanding how second-order ODEs are solved, and practising differential equations step by step.

Step-by-step method

  1. Write the ODE clearly (use y'' or d2y/dx2).
  2. Detect the second-order type (constant coefficients, Euler-Cauchy, or general).
  3. Apply the matching method (characteristic / Euler ansatz / symbolic solver).
  4. Include constants (C1, C2).
  5. If initial conditions are given, solve for the constants.
  6. Rewrite the final solution in terms of y(x).

Formula bank:

Constant coefficients (hom): a
d²y
dx²
+ b
dy
dx
+ cy = 0
Characteristic: ar² + br + c = 0
Euler-Cauchy (hom): x²y'' + ax y' + by = 0
Try y = x^m ⇒ m(m−1) + a m + b = 0
Linear 2nd order: y'' + P(x)y' + Q(x)y = R(x)
Use a symbolic solver when needed.
General: attempt dsolve (when possible).

Example 1: y'' + y = 0, x, y, y(0)=0, y'(0)=1

Step 1 - Write the ODE.

In this problem: Start with the given differential equation.

d²y
dx²
+ y = 0

Step 2 - Identify the type.

In this problem: Second-order linear with constant coefficients (homogeneous).

Constant coefficients (hom): a
d²y
dx²
+ b
dy
dx
+ cy = 0
Characteristic: ar² + br + c = 0

Step 3 - Identify constant coefficients.

In this problem: Match a y'' + b y' + c y = 0.

a = 1
b = 0
c = 1

Step 4 - Write the characteristic equation.

In this problem: Replace y with e^{rx}.

1 + r2 = 0

Step 5 - Solve for r.

In this problem: Find the roots of the characteristic equation.

r: −I, I

Step 6 - Write the general solution.

In this problem: Complex conjugate roots.

y = C1cos(x) + C2sin(x)

Step 7 - Apply initial conditions (if possible).

In this problem: Use the given values to determine constants.

y(0) = 0
y′(0) = 1

Step 8 - Final answer.

In this problem: Write the solution in standard form.

y = sin(x)

Final answer: Solution

Example 2: x^2y'' - xy' + y = 0, x, y

Step 1 - Write the ODE.

In this problem: Start with the given differential equation.

x2
d²y
dx²
− x
dy
dx
+ y = 0

Step 2 - Identify the type.

In this problem: Euler-Cauchy (homogeneous).

Euler-Cauchy (hom): x²y'' + ax y' + by = 0
Try y = x^m ⇒ m(m−1) + a m + b = 0

Step 3 - Identify Euler-Cauchy form.

In this problem: Match x²y'' + a x y' + b y = 0 (up to a constant factor).

k1 = 1
k2 = -1
k3 = 1

Step 4 - Write the indicial equation.

In this problem: Try y = x^m.

1 − m + m(−1 + m) = 0

Step 5 - Solve for m.

In this problem: Find the roots of the indicial equation.

m: 1

Step 6 - Write the general solution.

In this problem: Repeated root.

y = x(C1 + C2ln(x))

Step 7 - Final answer.

In this problem: Write the solution in standard form.

y = x(C1 + C2ln(x))

Final answer: Solution