Ordinary differential equations
A differential equation relates a function to its derivatives: it describes how something changes (a temperature that cools, the charge of a capacitor, a mass that oscillates). This topic explains first-order separable and linear equations, second-order equations with constant coefficients and initial conditions.
What a solution is
A solution of is a function that satisfies it. The order is that of the highest derivative. The general solution has as many arbitrary constants as the order (, or and …): it is a family of curves. Initial conditions (, …) pick one curve of the family: the particular solution.
Geometrically, gives the slope at every point of the plane (the slope field); a solution is a curve that follows that slope at every point.
First order
Separable: . Separate the variables and integrate each side:
Linear: . Multiply by the integrating factor , which turns the left side into the derivative of a product: , and it is enough to integrate.
Second order with constant coefficients
For , try : this leaves the characteristic equation , and its roots give the solution:
| Roots | General solution | Behavior |
|---|---|---|
| distinct real , | exponential, no oscillation (overdamped) | |
| double | the borderline case (critical damping) | |
| complex | oscillates with frequency (underdamped if ) |
If the right side is not 0 (a nonhomogeneous equation), the solution is : that of the homogeneous one plus a particular one. By undetermined coefficients, is tried with the shape of the right side: a polynomial for a polynomial, for , for a sine or cosine; if that shape is already in , multiply by .
Common mistakes
- Forgetting the constant when integrating, or putting it on one side only and then losing it while solving for .
- Using the integrating factor without first writing the equation as (the coefficient of must be 1).
- Applying the initial conditions to instead of to the full solution .
- With a double root, writing (that is a single constant): the is missing.
Worked examples
Example 1A separable equation
Solution
- Separate: . Integrating: .
- ; with (and , also a solution): .
Solve it in Simuveliq
- In Math → Symbolic calculator, topic Series and differential equations, operation Differential equations: type
y'=x y; press Compute. The Answer is . - The calculator sees it as linear () and uses the integrating factor : the result is the same.
Example 2First-order linear
Solution
- , so : .
- → .
- Check: ✓.
Solve it in Simuveliq
- In Math → Symbolic calculator, topic Series and differential equations, operation Differential equations: type
y'+2y=e^x; press Compute. The Answer is . - The calculator uses (characteristic root and , with ): the same result by another route.
Example 3A cooling coffee
Solution
- It is separable (and linear): → → .
- → : .
- °C. For : → min.
Solve it in Simuveliq
- In Math → Symbolic calculator, topic Series and differential equations, operation Differential equations: type
y'=-0.1(y-20)and, in Initial conditions (optional),y(0)=90; press Compute. The Answer is (the calculator calls the time and the temperature ).
Example 4Distinct real roots
Solution
- Characteristic: → , .
- : both exponentials decay, with no oscillation.
Solve it in Simuveliq
- In Math → Symbolic calculator, topic Series and differential equations, operation Differential equations: type
y''+3y'+2y=0; press Compute. The Answer is .
Example 5With initial conditions
Solution
- From the general one: and .
- Subtracting: , . It is the first curve of the three-cases figure.
Solve it in Simuveliq
- In Math → Symbolic calculator, topic Series and differential equations, operation Differential equations: type
y''+3y'+2y=0and, in Initial conditions (optional),y(0)=1, y'(0)=0; press Compute. The Answer is .
Example 6Double root
Solution
- : double root .
- One exponential alone is missing an independent solution: the second is . .
Solve it in Simuveliq
- In Math → Symbolic calculator, topic Series and differential equations, operation Differential equations: type
y''-2y'+y=0; press Compute. The Answer is .
Example 7Complex roots: oscillation
Solution
- → : , .
- : it oscillates without damping, with angular frequency 2 (period ).
Solve it in Simuveliq
- In Math → Symbolic calculator, topic Series and differential equations, operation Differential equations: type
y''+4y=0; press Compute. The Answer is .
Example 8Nonhomogeneous: undetermined coefficients
Solution
- Homogeneous: → .
- Particular: try ( is not in ). → , .
- .
Solve it in Simuveliq
- In Math → Symbolic calculator, topic Series and differential equations, operation Differential equations: type
y''+y=sin(2x); press Compute. The Answer is .