Differential Equations Solver
Solve first and second order ordinary differential equations with step-by-step work. Enter values for instant results with step-by-step formulas.
Reviewed for accuracy by Manoj Kumar, Mathematics Educator
Differential Equations Solver
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: ay'' + by' + cy = 0 => Characteristic: ar^2 + br + c = 0
Worked example โ y = 3e^(-2x) | y(2) = 0.0550 | Exponential Decay | Half-life = 0.3466
Formula
ay'' + by' + cy = 0 => Characteristic: ar^2 + br + c = 0
For constant-coefficient linear ODEs, substituting y = e^(rx) converts the differential equation into an algebraic characteristic equation. The roots determine the solution form: real distinct roots give exponentials, repeated roots give xe^(rx) terms, and complex roots give oscillatory sine/cosine solutions.
Worked Examples
Example 1: First Order Exponential Decay
Problem:Solve dy/dx + 2y = 0 with y(0) = 3. Evaluate at x = 2.
Solution:Equation: dy/dx = -2y Separate: dy/y = -2 dx Integrate: ln|y| = -2x + C y = Ce^(-2x) Apply IC y(0) = 3: C = 3 Particular solution: y = 3e^(-2x) y(2) = 3e^(-4) = 3(0.01832) = 0.05496
Result:y = 3e^(-2x) | y(2) = 0.0550 | Exponential Decay | Half-life = 0.3466
Example 2: Second Order Damped Oscillation
Problem:Solve y'' + 2y' + 5y = 0 with y(0) = 3, y'(0) = 0. Find y(2).
Solution:Characteristic eq: r squared + 2r + 5 = 0 Discriminant = 4 - 20 = -16 < 0 r = -1 +/- 2i (complex roots) General: y = e^(-x)[C1 cos(2x) + C2 sin(2x)] Apply IC: C1 = 3, C2 = 1.5 y = e^(-x)[3cos(2x) + 1.5sin(2x)] y(2) = e^(-2)[3cos(4) + 1.5sin(4)]
Result:Damped Oscillation | Eigenvalues: -1 +/- 2i | Period: 3.1416
Frequently Asked Questions
What is a differential equation and why is it important?
A differential equation is a mathematical equation that relates a function to its derivatives, expressing how a quantity changes in relation to one or more independent variables. They are fundamentally important because virtually every physical process that involves change over time or space can be modeled using differential equations. Newton's second law (F = ma) is a second-order differential equation, Maxwell's equations governing electromagnetism are partial differential equations, and population growth models use first-order ordinary differential equations. Understanding how to solve these equations allows scientists and engineers to predict system behavior, from the trajectory of a spacecraft to the spread of a disease through a population.
What is the difference between first order and second order differential equations?
The order of a differential equation refers to the highest derivative that appears in the equation, and it fundamentally determines the solution method and the number of arbitrary constants in the general solution. First-order equations contain only the first derivative (dy/dx) and require one initial condition to determine a unique solution, making them suitable for modeling simple growth, decay, and mixing problems. Second-order equations contain the second derivative (d2y/dx2) and require two initial conditions (typically the function value and its first derivative at a point). Second-order equations model oscillatory systems, spring-mass systems, electrical circuits, and beam deflections, where the relationship between acceleration (second derivative) and position is fundamental.
How do I solve a first-order linear differential equation?
First-order linear differential equations have the standard form dy/dx + P(x)y = Q(x) and are solved using the integrating factor method. The integrating factor is mu(x) = e raised to the integral of P(x)dx. Multiplying both sides of the equation by this integrating factor transforms the left side into the derivative of mu(x) times y, making integration straightforward. The general solution becomes y = (1/mu(x)) times the integral of mu(x) Q(x) dx plus C. For the special case where Q(x) = 0 (homogeneous equation), separation of variables also works: divide by y, integrate both sides, and exponentiate. An initial condition y(x0) = y0 determines the constant C for the particular solution.
What is the characteristic equation for second-order ODEs?
The characteristic equation is a polynomial equation obtained by substituting y = e raised to rx into a linear constant-coefficient ODE, transforming the differential equation into an algebraic equation that is much easier to solve. For the equation ay'' + by' + cy = 0, substituting y = e^(rx) gives ar squared + br + c = 0, which is a quadratic equation in r. The discriminant b squared minus 4ac determines the solution type: positive discriminant gives two distinct real roots and exponential solutions, zero discriminant gives a repeated root and solutions involving xe^(rx), and negative discriminant gives complex roots and oscillatory solutions involving sine and cosine. This method is one of the most elegant connections between algebra and calculus.
What do complex roots in the characteristic equation mean physically?
Complex roots in the characteristic equation indicate oscillatory behavior in the solution, which corresponds to physical systems that vibrate, swing, or cycle. The complex roots take the form alpha plus or minus beta i, where alpha is the real part controlling whether oscillations grow (alpha > 0), decay (alpha < 0), or remain constant (alpha = 0). The imaginary part beta determines the frequency of oscillation, with the period being 2 pi divided by beta. A spring-mass system with damping produces complex roots where the real part represents damping and the imaginary part represents the natural frequency. Pure imaginary roots (alpha = 0) represent perpetual oscillation without energy loss, which is the idealized undamped case.
How are differential equations used in real-world applications?
Differential equations model virtually every dynamic process in science and engineering, making them indispensable across disciplines. In biology, the logistic equation dy/dt = ry(1 - y/K) models population growth with carrying capacity. In physics, Newton's law of cooling dT/dt = -k(T - Te) describes temperature change. In electrical engineering, RLC circuits are modeled by second-order ODEs that produce the same mathematics as mechanical spring-mass-damper systems. Chemical reaction kinetics, fluid flow, heat transfer, structural vibrations, economic models, and epidemiological SIR models all rely on differential equations. Numerical solution methods like Euler's method and Runge-Kutta are used when analytical solutions are impossible, which is the case for most real-world problems.
What is an initial value problem versus a boundary value problem?
An initial value problem (IVP) specifies the function value and possibly its derivatives at a single point, typically the starting time or position, allowing the solution to be computed forward from that point. For a second-order ODE, an IVP gives y(0) and y'(0). A boundary value problem (BVP) specifies conditions at two or more different points, such as the endpoints of an interval, for example y(0) = 1 and y(L) = 0. IVPs are natural for time-dependent problems where you know the initial state and want to predict future behavior. BVPs arise in spatial problems like beam deflections, temperature distributions, and quantum mechanics where you know conditions at the boundaries of a physical domain.
What is the Euler method for solving differential equations numerically?
Euler's method is the simplest numerical technique for approximating solutions to initial value problems when analytical solutions are unavailable or impractical. Starting from the initial condition y(x0) = y0, the method steps forward by computing y(n+1) = y(n) + h times f(x(n), y(n)), where h is the step size and f gives the derivative value. Each step uses the current slope to project the solution forward by a small increment. While conceptually simple, Euler's method has limited accuracy because it assumes the slope is constant over each step, leading to accumulated error proportional to the step size h. Improved methods like the fourth-order Runge-Kutta method use multiple slope evaluations per step to achieve much higher accuracy without dramatically smaller step sizes.
How do I determine the stability of a differential equation solution?
Stability analysis determines whether solutions remain bounded (stable) or grow without limit (unstable) over time, which is crucial for engineering design and control systems. For linear ODEs with constant coefficients, stability depends entirely on the eigenvalues (roots of the characteristic equation): all roots with negative real parts indicate stability (solutions decay to zero), any root with positive real part indicates instability (solutions grow exponentially), and purely imaginary roots indicate marginal stability (perpetual oscillation). For nonlinear systems, linearization around equilibrium points reveals local stability behavior. Phase plane analysis provides geometric insight by plotting solution trajectories in the y versus dy/dt plane. Stable systems return to equilibrium after perturbation, while unstable systems diverge from equilibrium.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎDifferential Equation Solver
Calculate differential equation solver with inputs, formulas, and instant results.
๐งฎSimultaneous Equations Solver
Solve systems of 2 or 3 simultaneous equations using elimination and substitution.
๐งฎEquation Solver
Solve linear, quadratic, cubic, and polynomial equations with step-by-step solutions.
๐งฎQuartic Equation Solver
Calculate quartic equation solver with inputs, formulas, and instant results.
๐งฎSystem of Equations Calculator
Calculate system of equations with inputs, formulas, and instant results.
๐งฎDifferential Approximation Calculator
Calculate differential approximation with inputs, formulas, and instant results.
๐งฎSylvester Equation Solver
Calculate sylvester equation solver with inputs, formulas, and instant results.
๐งฎKarnaugh MAP Solver
Calculate karnaugh map solver with inputs, formulas, and instant results.