Solve a·y'' + b·y' + c·y = f(x): characteristic roots, three homogeneous cases, undetermined coefficients with resonance, and C1/C2 from initial conditions.
Execution
Run this tool
Fill in the form, run the tool, and review the result in one place.
Samples
Examples that match this tool
Related
Continue with connected tools and hubs
Result
Ready for a run
Run the tool to preview files, text, structured data, or streamed output here.
Tool usage guide
Learn when to use this tool, what it supports, and how real users apply it.
Key facts
Category
Math & Numbers
Input types
number, select, text
Output type
text
Sample coverage
4
API ready
Yes
Overview
The Second-Order ODE Solver computes solutions to linear differential equations of the form a·y'' + b·y' + c·y = f(x). It evaluates the characteristic equation to classify homogeneous solutions into real distinct, repeated, or complex conjugate roots, determines particular solutions using undetermined coefficients with resonance adjustments, and calculates integration constants C1 and C2 when initial conditions are provided.
When to use
Solving second-order linear ordinary differential equations with constant coefficients.
Analyzing forced systems like harmonic oscillators or RLC circuits under constant, polynomial, exponential, or sinusoidal inputs.
Evaluating initial value problems to determine constants C1 and C2 from given y(x₀) and y'(x₀) values.
How it works
1Input coefficients a, b, and c to construct the auxiliary characteristic equation a·r² + b·r + c = 0 and calculate its discriminant.
2Select the forcing function f(x)—none, constant, polynomial, exponential, or sinusoidal—and supply its corresponding parameters.
3The solver computes the characteristic roots, determines the homogeneous solution yh, and calculates the particular solution yp while handling resonance if the forcing term shares roots.
4Optionally enter initial conditions x₀, y₀, and y'₀ to solve the 2×2 linear system for integration constants C1 and C2.
Use cases
Verifying analytical calculus and differential equations coursework solutions step by step.
Modeling damped and driven physical oscillators in classical mechanics.
Calculating transient and steady-state responses in electrical circuits described by second-order ODEs.
Examples
1. Homogeneous Initial Value Problem
Engineering Student
Background
Analyzing a damped system governed by y'' − 3y' + 2y = 0 with initial state y(0) = 1 and initial derivative y'(0) = 0.
Problem
Determine the exact particular trajectory satisfying both initial conditions.
How to use
Set a = 1, b = -3, c = 2, select forcing 'None', and set x0 = 0, y0 = 1, y0prime = 0.
a = 1, b = -3, c = 2, forcing = 'none', x0 = 0, y0 = 1, y0prime = 0
Outcome
Finds roots r₁ = 2 and r₂ = 1, computes yh = C1·e^(2x) + C2·e^x, and solves for C1 = -1 and C2 = 2 to output y = -e^(2x) + 2e^x.
2. Undamped Oscillator Under Sinusoidal Resonance
Physics Instructor
Background
Demonstrating pure resonance in an undamped harmonic oscillator described by y'' + y = sin(x).
Problem
Derive the particular solution when the driving frequency matches the system natural frequency.
How to use
Set a = 1, b = 0, c = 1, select forcing 'Sine/cosine', and enter sinA = 1, sinB = 0, sinK = 1.
FAQ
How does the solver handle negative discriminants?
When the discriminant is negative, the solver produces complex conjugate roots α ± βi and writes the homogeneous solution in terms of e^(αx) multiplied by sine and cosine terms.
What happens if a forcing term causes resonance?
If the forcing frequency or exponential rate matches a root of the characteristic equation, the solver multiplies the trial particular solution by x or x² to find the correct particular solution.
What types of non-homogeneous forcing terms are supported?
You can select constant values, polynomials up to degree 5, exponentials A·e^(kx), or sinusoidal functions A·sin(kx) + B·cos(kx).
Do I need to provide initial conditions?
No. If initial conditions are omitted, the solver outputs the general solution containing arbitrary constants C1 and C2.
Why must coefficient a be nonzero?
If a is zero, the equation reduces to a first-order differential equation rather than a second-order equation.
a = 1, b = 0, c = 1, forcing = 'sinusoid', sinA = 1, sinB = 0, sinK = 1
Outcome
Identifies complex roots r = ±i, applies an x-multiplier for resonance, and yields yp = -0.5x·cos(x) with general solution y = C1·cos(x) + C2·sin(x) - 0.5x·cos(x).