A differential equation (DE) is any equation that involves a function and its derivatives. Solving a DE means finding the function itself. This is the reverse of what you've been doing: instead of 'given , find ', now it's 'given a relationship involving (and maybe ), find '.
Differential equations model nearly everything that changes: population growth, radioactive decay, temperature cooling, spring motion, electrical circuits, and fluid flow. If something evolves over time, there's a DE behind it.
We'll start with the simplest types (separable, linear first-order) and build up to second-order equations. The key is recognizing which type you're dealing with, then applying the appropriate solution technique.
What is a differential equation?
A DE relates a function to its derivatives. The order of a DE is the highest derivative that appears.
First-order: involves (but not ). Example: .
Second-order: involves . Example: (simple harmonic motion).
A solution is a function that satisfies the equation for all in some interval.
The general solution contains arbitrary constants (one constant for first-order, two for second-order). An initial value problem (IVP) provides conditions to determine these constants.
Direction fields (slope fields)
A direction field visualizes a first-order DE by drawing short line segments with slope at many points .
The solution curves must be tangent to these segments at every point. So by drawing segments, you can see the shape of solutions without solving the equation.
Direction fields build intuition: you can spot equilibrium solutions (horizontal segments), identify whether solutions grow or decay, and see the qualitative behavior before doing any algebra.
Example: for , the slopes are negative when and positive when . Solutions decay toward , which matches .
💡Explain it simply
Imagine a field of grass with wind blowing in different directions at different spots. At each point, you draw a tiny arrow showing which way the wind blows there.
A direction field is exactly that for a differential equation. At every point , the equation tells you the slope (direction) a solution would travel through that point. Draw that slope as a tiny line segment.
Now if you drop a leaf (a solution) anywhere in the field, it will follow the arrows. The path it traces is the solution curve. You can see the overall behavior — where things flow, where they settle — without ever solving the equation algebraically.
Separable equations
A first-order DE is separable if it can be written as , where one factor depends only on and the other only on .
To solve: separate the variables: . Then integrate both sides.
Don't forget the constant of integration! Usually written as on one side.
Example: . Separate: . Integrate: . Solve: where .
Watch for lost solutions: when dividing by , any value where might be a constant solution (equilibrium) that you lose in the algebra.
Solving a separable equation with an IVP
- Solve with .
- Step 1 — separate: move all terms to the left, terms to the right. Multiply both sides by : .
- Step 2 — integrate both sides: , giving .
- Step 3 — apply the initial condition : , so .
- Step 4 — solve for : , so (positive root since ).
- This is a family of hyperbolas. The initial condition picked out the specific upper branch passing through .
Exponential growth and decay
The DE is separable with solution where .
If : exponential growth (populations, compound interest, viral spread).
If : exponential decay (radioactive decay, cooling, drug elimination).
Half-life: the time for the quantity to halve. If , the half-life is .
Doubling time: the time for the quantity to double. Doubling time for .
Newton's Law of Cooling
The temperature of an object changes at a rate proportional to the difference between its temperature and the ambient temperature: .
This is separable. Solution: where is the initial temperature.
As , . The object approaches room temperature exponentially.
Linear first-order equations
Standard form: . The key: this is always solvable using an integrating factor.
Integrating factor: .
Multiply the entire equation by : the left side becomes .
Integrate both sides: .
Solve for : .
Why it works: multiplying by turns the left side into a perfect derivative, which can be integrated directly.
Solving with an integrating factor
- Solve .
- Step 1 — identify: and . Already in standard form.
- Step 2 — compute the integrating factor: .
- Step 3 — multiply the entire equation by : .
- The left side is now (that's the whole point of the integrating factor). The right side simplifies to .
- Step 4 — integrate both sides: .
- Step 5 — solve for : .
- The term is the transient part (dies off), while is the 'steady-state' particular solution.
Logistic growth
The logistic equation models growth with a carrying capacity : .
When is small compared to , growth is approximately exponential (). As approaches , growth slows and stops.
Solution: where .
The graph is an S-shaped (sigmoidal) curve. The population grows fastest at (the inflection point).
Applications: population biology, spread of diseases, adoption of technology, logistic regression in machine learning.
💡Explain it simply
Imagine rabbits on an island. At first there are few rabbits and lots of food, so the population explodes (exponential growth). But as the island fills up, food gets scarce, rabbits compete, and growth slows down. Eventually, the population levels off at the maximum the island can support (the carrying capacity).
The logistic equation captures this perfectly. The part acts like a brake. When is tiny, the brake is barely on and growth is fast. When is close to , the brake is almost fully on and growth nearly stops.
This S-shaped curve shows up everywhere: the spread of a new app, a virus through a population, a rumor through a school. Fast start, rapid middle, gradual leveling off.
Bernoulli equations
A Bernoulli equation has the form where .
Trick: substitute , then .
After substitution, the equation becomes linear in : .
Solve the linear equation for , then convert back to .
Second-order linear homogeneous equations
Standard form: with constant coefficients.
Guess , substitute, and get the characteristic equation: .
Case 1 - Two distinct real roots : general solution is .
Case 2 - Repeated root : general solution is . The extra factor accounts for the repeated root.
Case 3 - Complex roots : general solution is . This produces oscillatory behavior (springs, circuits).
Complex roots: oscillation
- Solve .
- Guess and substitute: , so .
- Solve: , giving . These are complex roots with and .
- Apply the complex root formula: .
- Simplify: .
- This is pure oscillation with no decay (because ). The angular frequency is , giving a period of .
- Physical meaning: this models an ideal spring with no friction — it bounces forever.
Distinct real roots with initial conditions
- Solve with and .
- Characteristic equation: . Roots: and .
- General solution: .
- Apply : .
- For : first find , then .
- Solve the system: from we get . Substituting into : , so and .
- Final answer: .
Non-homogeneous equations and particular solutions
Form: where .
The general solution is where is the homogeneous solution (solve with ) and is any particular solution.
Method of undetermined coefficients: guess the form of based on .
If , try . If or , try . If is a polynomial of degree , try a polynomial of degree .
If your guess duplicates a term in , multiply by (or if needed).
Variation of parameters is a more general method that works for any but involves more computation.
Applications: springs and oscillations
A mass-spring system obeys where is mass, is damping, is spring constant, and is external force.
Undamped free oscillation (, ): with . Solution: . Pure sinusoidal motion.
Damped oscillation (, ): the solution includes with , causing the amplitude to decay over time.
Overdamped (): no oscillation, just slow return to equilibrium.
Critically damped (): fastest return to equilibrium without oscillating.
Underdamped (): oscillation with decaying amplitude.
💡Explain it simply
Think of a kid on a swing. If nobody pushes and there's no friction, the swing goes back and forth forever at the same height — that's undamped oscillation.
Now add friction (air resistance, rusty chains). The swing still goes back and forth, but each swing is a little smaller until it stops — that's underdamped (oscillation with decay).
If you put the swing in thick honey, it wouldn't even swing — it would just slowly drift back to the bottom. That's overdamped. Critically damped is the sweet spot: the fastest return to rest without any overshooting. Engineers design car suspensions and door closers to be critically damped.
Initial value problems (IVPs)
An IVP provides the DE plus enough initial conditions to determine all constants.
First-order: one condition, typically .
Second-order: two conditions, typically and .
Procedure: solve the general solution first, then plug in the initial conditions and solve for the constants.
The Existence and Uniqueness Theorem: under mild conditions, a first-order IVP has exactly one solution through any given point.
Common Mistakes to Avoid
- Forgetting the constant of integration after separating and integrating. Every integration step produces a .
- Not separating variables completely before integrating. All -terms must be on one side, all -terms on the other.
- Plugging in initial conditions before finding the general solution. Get the general solution with constants first, then determine the constants.
- Forgetting to multiply the entire equation (both sides) by the integrating factor in linear first-order DEs.
- For second-order equations, forgetting the repeated root case. If the characteristic equation has a double root , the second solution is , not just .
- In undetermined coefficients, using a guess that duplicates a homogeneous solution. You must multiply by to fix this.
- Confusing the general solution with a particular solution. The general solution always contains arbitrary constants; a particular solution has specific values determined by initial conditions.
- Dividing by in a separable equation and losing the equilibrium solution .