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 differential equation (DE) is any equation that relates a function to one or more of its derivatives. The unknown is the function itself — you're solving for , not a number.
The order of a DE is the highest derivative that appears. First-order: (involves but not ). Second-order: (involves ). Higher-order DEs exist but are less common in a first course.
A solution is a function that, when substituted into the equation, makes it true for all in some interval. To verify a solution, plug it in and check: does both sides of the equation agree?
The general solution contains arbitrary constants: one constant for a first-order DE, two for second-order, etc. These constants represent the 'degrees of freedom' — infinitely many functions satisfy the DE, differing only in these constants. An initial value problem (IVP) pins down these constants by specifying conditions like .
Linear vs. nonlinear: a DE is linear if and its derivatives appear to the first power with no products like . Linear DEs have well-developed solution theory; nonlinear DEs are harder and may not have closed-form solutions.
💡Explain it simply
In algebra, you solve for a number (). In differential equations, you solve for an entire function (). The equation doesn't tell you what is directly — it tells you a relationship between and its rate of change. From that relationship, you figure out what function must be.
It's like being told: 'The speed of this car is always twice its position.' From that rule, you figure out the car must follow — that's the function that satisfies the rule.
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 says: the rate of change of is proportional to itself. It's separable: , integrating gives , so where .
If : exponential growth. The larger gets, the faster it grows. Applications: population growth (early phase), compound interest, viral spread, chain reactions.
If : exponential decay. The quantity shrinks at a rate proportional to its current size. Applications: radioactive decay, drug elimination from the body, cooling (simplified), depreciation.
Half-life: the time for the quantity to halve. Set , giving . This is constant — it doesn't depend on the current amount. Carbon-14 has a half-life of ~5730 years regardless of how much you start with.
Doubling time: for growth (), the time for the quantity to double is . The 'Rule of 70': at growth per year, the doubling time is approximately years.
💡Explain it simply
Exponential growth is like a snowball rolling downhill: the bigger it gets, the faster it grows. Exponential decay is the opposite: like ice melting — the less there is, the slower it melts. In both cases, the rate of change is proportional to the current amount, and the solution is always .
Newton's Law of Cooling
Newton's Law of Cooling states that an object's temperature changes at a rate proportional to the difference between its temperature and the surrounding (ambient) temperature: , where .
This is separable. Let , then , giving . Substituting back: .
Behavior: as , . The object approaches room temperature exponentially — quickly at first (when the temperature gap is large), then slower as it gets closer.
The constant depends on the object's material, surface area, and the surrounding medium (air vs. water, for instance). A larger means faster cooling. Determining usually requires two temperature readings at known times.
Applications: forensic science (estimating time of death from body temperature), cooking (how long until food cools to eating temperature), engineering (heat dissipation in electronics).
💡Explain it simply
A hot coffee cools down fast at first, then slower and slower as it gets closer to room temperature. Newton's Law of Cooling explains why: the bigger the gap between the coffee's temperature and the room, the faster it cools. As the gap shrinks, cooling slows down. The coffee never quite reaches room temperature — it just gets infinitely close.
Newton's Law of Cooling applied
- A cup of coffee at C is placed in a C room. After 5 minutes, it's C. Find the temperature after 10 minutes.
- Model: .
- Use the data point : , so , giving .
- Solve for : .
- Now find : C.
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 . When or , the equation is already linear. For other values of , the term makes it nonlinear.
The clever trick: substitute . Then . Divide the original Bernoulli equation by , and the substitution transforms it into a linear first-order equation in : .
Solve this linear equation using the integrating factor method from the earlier section. Once you have , convert back: .
Example: is Bernoulli with . Let . Then . Dividing by : , which becomes , or . This is linear and solvable with an integrating factor.
Bernoulli equations appear in population models with harvesting, certain fluid dynamics problems, and logistics applications.
💡Explain it simply
A Bernoulli equation looks like a linear equation but with a pesky spoiling things. The substitution is a change of variable that magically absorbs the nonlinearity, converting the equation to a standard linear one that you already know how to solve. Solve for , convert back to , done.
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 right-hand side represents an external 'forcing' — a driving input that pushes the system.
The general solution has two parts: . Here is the general solution to the homogeneous equation () — it captures the system's natural behavior. is any particular solution that accounts for the forcing. The combination gives every possible solution.
Method of undetermined coefficients: guess the form of based on and solve for the unknown coefficients. The guesses follow a pattern:
If : try . If (polynomial): try (same degree). If involves or : try (always include both sin and cos). If is a combination, use superposition — try the sum of individual guesses.
Duplication rule: if your guess for duplicates a term in , multiply by (or if it duplicates a repeated-root term). This ensures is genuinely new and not absorbed into .
Variation of parameters: a more general method that works for any , not just the special forms above. It uses where are the homogeneous solutions and are functions found via integrals. More work, but universally applicable.
💡Explain it simply
The homogeneous solution is what the system does 'on its own' — like a spring bouncing with no external force. The particular solution is the system's response to being pushed (). The full solution is the natural behavior plus the forced response.
Undetermined coefficients is educated guessing: if the push is exponential, the response is exponential. If the push is sinusoidal, the response is sinusoidal. Plug in your guess, match coefficients, and the 'undetermined' coefficients become determined.
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 pin down a unique solution from the infinite family of general solutions.
First-order DE: one initial condition, typically . This determines the one arbitrary constant in the general solution.
Second-order DE: two initial conditions, typically (starting position) and (starting velocity). These determine the two constants and .
Procedure: (1) find the general solution (with arbitrary constants), (2) apply the initial conditions to get a system of equations for the constants, (3) solve the system, (4) write the particular solution with specific constants.
The Existence and Uniqueness Theorem (Picard-Lindelöf): if is continuous and satisfies a Lipschitz condition in near , then the IVP , has exactly one solution in some interval around . This guarantees that solutions don't 'branch' or 'disappear' — there's always exactly one curve through each initial point.
Physical interpretation: knowing the DE gives you the rules of the system (how things change). The initial conditions specify the starting state. Together, they completely determine the future (and past) behavior. This is why differential equations are the language of deterministic physics.
💡Explain it simply
The general solution of a DE is like a family photo — it shows all possible solutions. The initial conditions pick out one specific person from the photo. For a first-order DE, one piece of information (a starting value) is enough to identify the unique solution. For second-order, you need two pieces (starting position and starting velocity).
The Existence and Uniqueness Theorem is nature's promise: given the rules of change and a starting point, there is exactly one future. No ambiguity, no branching. This is what makes differential equations predictive.
Solving a second-order IVP
- Solve with and .
- Characteristic equation: , giving .
- General solution: .
- Apply : .
- Compute . Apply : .
- Solve the system: adding the equations gives , so . Then .
- Particular solution: .
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 .