Module 1: What a Differential Equation Is
Meet the objects of the course: learn what a differential equation is, how to classify one, and how to check a solution.
Differential Equations and Their Language
- Define a differential equation and give physical examples of one.
- Classify an equation by its order and by whether it is ordinary or partial.
- Distinguish a general solution from a particular solution.
A differential equation is an equation that relates a function to its own derivatives. That single sentence carries the whole course, so let us unpack it slowly. An algebra equation like x^2 = 9 asks for a number: which values of x make the statement true? The answers are 3 and -3, and the problem is finished. A differential equation asks for something richer. It asks for a whole function, an entire curve of values, whose rate of change behaves exactly the way the equation describes. Solving one means recovering a quantity from a rule about how that quantity changes.
Because rates of change are everywhere in science, differential equations are the natural language of physics, biology, chemistry, engineering, and economics. Populations grow, coffee cools, circuits charge, medicines clear the bloodstream, satellites orbit. Each of those sentences contains a verb of change, and wherever there is a verb of change, a derivative is hiding.
The big picture
Here is the situation this course is built for. Nature rarely hands us a formula for the thing we want. It hands us a rule about how the thing changes. We can measure that a bacteria colony grows faster when it is larger, or that a hot drink loses heat faster when it is much hotter than the room. Both are statements about derivatives. A differential equation writes such a statement in symbols, and solving the equation converts the rule about change into a formula for the quantity itself.
Keep one analogy in your pocket for the whole course. The derivative is the speedometer and the function is the odometer. A differential equation tells you what the speedometer reads at every moment. Solving the equation answers a different question: where is the car at every moment? Same trip, two descriptions, and the solving process is the bridge from one to the other.
Key idea: an algebra equation has a number for an answer. A differential equation has a function for an answer.
A first example
Suppose a population y(t) grows at a rate proportional to its current size. Read y(t) aloud as "y of t," the population at time t. "Rate of change" is the derivative dy/dt, read aloud as "the rate at which y changes as time passes." "Proportional to its size" means the rate equals a constant times y. The sentence, translated into symbols, is the differential equation:
dy/dt = k y
In words: the population's growth rate equals the constant k times the population itself. Twice the bacteria produce twice the growth. That is the entire biological claim, written in a handful of symbols.
A solution is any function that makes the equation true. Here is a candidate: y(t) = C e^(k t), where C is a constant. Let us test it with honest calculus, one small step at a time.
- Differentiate the candidate. The derivative of
C e^(k t)with respect totisC k e^(k t), because the chain rule brings down the factorkfrom the exponent. - Compute the right side of the equation:
k y = k (C e^(k t)) = C k e^(k t). - Compare. Both sides equal
C k e^(k t)for everytand everyC. The equation is satisfied, so the candidate is a solution.
Look at what happened there. We did not solve anything yet. We proposed a function, differentiated it, and confirmed that it obeys the rule. Checking a solution needs nothing but differentiation, which is why it is the skill we practice first.
Notice there is not one solution but a whole family, one member for each value of C. Take C = 100: the curve y = 100 e^(k t) starts at 100 and grows. Take C = 7: that curve starts at 7. The complete collection, y = C e^(k t), is the general solution.
Choosing one curve from the family requires one extra fact, an initial condition such as y(0) = 100, which says the population began at 100. Substituting t = 0 gives y(0) = C e^0 = C, so C = 100, and the single particular solution is y = 100 e^(k t).
Key idea: the general solution is a family of curves. An initial condition picks out the one curve that passes through your starting point.
What counts as a solution
A solution must satisfy the equation at every point of some interval, not merely at one convenient spot. Consider the modest equation dy/dx = 3x^2, read "the slope of y equals three x squared." Integrating the right side suggests y = x^3 + C. Check it: the derivative of x^3 + C is 3x^2, which matches the right side for every x. So y = x^3 + C is the general solution, again a family, one curve per value of C.
Two habits are worth building immediately. First, always carry the constant of integration; dropping it silently throws away every solution but one. Second, remember that a solution can be valid on a limited interval. The function y = 1/x solves y' = -y^2 wherever it is defined, but it is not defined at x = 0, so we describe it as a solution on x > 0 or on x < 0, not on the whole line. Interval-of-validity questions return in later lessons; for now it is enough to know they exist.
Order
The order of a differential equation is the highest derivative that appears in it.
dy/dx = 3xis first order (only a first derivative).y'' + 4y = 0is second order (a second derivative appears).y''' - y' = e^xis third order.
Order matters for a concrete reason: it counts how much starting information the problem needs. Undoing one derivative requires one integration and produces one arbitrary constant, so a first-order equation needs one initial condition. A second-order equation needs two integrations, hence two constants, hence two facts, typically a starting value and a starting rate. A falling object is the classic case. Its height obeys the second-order equation y'' = -9.8 (meters per second squared), and predicting its path requires both where it started and how fast it was moving. One fact alone cannot pin down the motion.
This course focuses on first- and second-order equations. That is less limiting than it sounds, because those two orders cover an enormous range of applications, and the methods for them generalize.
Ordinary versus partial
An ordinary differential equation (ODE) involves a function of a single variable, so every derivative in it is an ordinary derivative like dy/dx or y''. A partial differential equation (PDE) involves a function of several variables and its partial derivatives. The heat equation is the famous example: the temperature u(x, t) of a metal rod depends on both position x and time t, and the equation u_t = u_xx relates the time rate of change to the way temperature curves along the rod.
Telling them apart takes one glance. If the unknown function has one input, the equation is an ODE. If it has two or more inputs, and partial derivatives appear, it is a PDE. Everything in MATH 308 is an ODE; PDEs have their own later course, and everything you learn here is the foundation for it.
Linear versus nonlinear (a preview)
An ODE is linear if the unknown function and its derivatives appear only to the first power and are never multiplied together, with no function like sin(y) or e^y wrapped around them. The variable x may appear in any form; the restriction is entirely about y and its derivatives. So y'' + 3y' + 2y = cos(x) is linear: each of y'', y', y stands alone, to the first power, and cos(x) involves only x.
Compare three troublemakers. y' = y^2 is nonlinear because y is squared. y y' = 1 is nonlinear because y multiplies y'. y'' + sin(y) = 0 is nonlinear because y sits inside a sine. A quick scan for powers, products, and wrappers around the unknown settles the question every time.
Why we care: linear equations obey a superposition structure that makes them solvable by systematic methods, and most of the exact techniques in this course apply to them. Nonlinear equations are not off limits, some separable ones yield nicely, but they are wilder. We sharpen the linearity test into a precise definition in the next lesson.
From sentences to symbols
The working skill of this whole subject is translation. A short dictionary covers most sentences. "The rate of change of X" becomes dX/dt. "Is proportional to" becomes "equals a constant times." "The difference between A and B" becomes A - B. Watch it work three times.
First: "a skydiver's speed v increases at 9.8 meters per second squared, minus a drag of 0.5 times the current speed." Translation: dv/dt = 9.8 - 0.5 v. Second: "a bank balance A grows continuously at 3 percent per year." The rate of change is 3 percent of the balance: dA/dt = 0.03 A. Third: "a drink's temperature T changes at a rate proportional to the difference between the drink and the 20 degree room." Translation: dT/dt = -k (T - 20), where the minus sign makes a hot drink cool down rather than heat up.
None of these required solving anything. Translation is its own skill, and it is the one working scientists use most. The solving methods occupy the rest of the course.
Where people get stuck
Expecting a number. After years of algebra, it is natural to hunt for a numeric answer. Here the answer is a function, such as y = 100 e^(k t). If you finish a problem holding a single number, revisit what was asked.
Dropping the constant. Writing y = x^3 instead of y = x^3 + C loses the entire family and will make initial-value problems unsolvable later. The constant is not decoration; it is where the initial condition attaches.
Confusing order with power. The equation (y')^2 + y = x contains a square, but the highest derivative is y', so it is first order (and nonlinear). Order counts derivatives, not exponents.
Assuming the variable is time. We often write t, but dy/dx = 3x is a perfectly good ODE where the input is position. The theory cares only that there is one independent variable.
Try it
Classify each equation by order, ODE versus PDE, and linear versus nonlinear: (a) y' - x y = 0, (b) y'' + (y')^2 = 0, (c) u_t = 4 u_xx. Then translate: "a radioactive sample decays at a rate proportional to the amount present."
Worked answers: (a) first order, ODE, linear, since y and y' appear to the first power and x is only a coefficient. (b) Second order, ODE, nonlinear, because y' is squared. (c) A PDE, second order in x, because partial derivatives in two variables appear. The translation: dy/dt = -k y with k > 0, the minus sign recording that the amount shrinks. If you got these, you have the vocabulary of the entire course in hand.
Recap
A differential equation relates a function to its derivatives, and its solution is a function, usually a whole family tagged by a constant. The order is the highest derivative present and predicts how many initial conditions are needed. ODEs have one independent variable; PDEs have several. Linear equations keep y and its derivatives to the first power, unmultiplied and unwrapped, and they are where our strongest methods live.
The workflow of the whole course is now visible: read a situation, translate it into a differential equation, solve for the general solution, then use initial conditions to select the particular solution that answers the real question. Every lesson from here forward fills in one piece of that pipeline.
Sources
- Lebl, J. (n.d.). Introduction to differential equations. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Lebl, J. (n.d.). Classification of differential equations. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Herman, E., & Strang, G. (2016). Basics of differential equations. In Calculus Volume 2. OpenStax. openstax.org
- Dawkins, P. (n.d.). Differential Equations. Paul's Online Math Notes, Lamar University. tutorial.math.lamar.edu
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- Mattuck, A., Miller, H., Orloff, J., & Lewis, J. (2010). 18.03 Differential equations [Course materials]. MIT OpenCourseWare. ocw.mit.edu
- Key terms
- Differential equation
- An equation relating a function to one or more of its derivatives.
- Order
- The highest derivative that appears in the equation.
- Ordinary differential equation (ODE)
- A differential equation whose unknown is a function of a single variable.
- General solution
- The full family of solutions, containing arbitrary constants.
- Particular solution
- One specific solution selected by initial conditions.
- Initial condition
- A known value like y(0) = 100 used to determine an arbitrary constant.
Verifying Solutions, Linearity, and Initial Value Problems
- Check whether a given function solves a differential equation by substitution.
- State the precise test for a linear differential equation.
- Set up an initial value problem and find the constant it determines.
Before learning to find solutions, it is worth learning to check them, because checking is always available and never lies. Every solving method in this course, separation, integrating factors, characteristic equations, Laplace transforms, produces a candidate function. Verification is how you confirm the candidate with your own hands: differentiate it as many times as the equation needs, substitute into both sides, and confirm they agree for all values of the variable. No answer key required.
The big picture
This lesson builds three tools you will use in every later chapter. First, the substitution check, which turns "is this a solution?" into a short calculus exercise. Second, the precise test for linearity, the property that decides which solving methods apply. Third, the initial value problem, the package of equation plus starting data that turns a family of solutions into one specific prediction.
A useful way to hold the first tool in mind: a proposed solution is a claim, and the differential equation is the test the claim must pass. Differentiation runs the test. If both sides match everywhere, the claim stands. If they match only at a special point, or not at all, the claim fails. This habit of testing will also catch your own arithmetic slips later, which is where most lost points actually come from.
Key idea: to verify a solution you differentiate and compare. You never need to know how the candidate was found.
Worked example, verifying a solution
Show that y = C e^(3x) solves y' = 3y. Read the equation aloud: the derivative of y equals three times y itself.
- Differentiate the candidate. The derivative of
C e^(3x)isC e^(3x)times 3, by the chain rule, soy' = 3 C e^(3x). - Compute the right side separately:
3y = 3 (C e^(3x)) = 3 C e^(3x). - Compare the two results. Left side
3 C e^(3x), right side3 C e^(3x). They are identical for everyxand everyC.
What we checked, in words: this function's speedometer reading really is three times its odometer reading at every instant. The whole family, one member per value of C, passes the test at once. That is a complete verification, three lines long.
Worked example, a second-order check
Show that y = cos(2x) solves y'' + 4y = 0. A second-order equation needs two derivatives, so we compute both, one at a time, with the chain rule factor written explicitly.
- First derivative:
y' = -sin(2x) * 2 = -2 sin(2x). The inner function2xcontributes the factor 2. - Second derivative: differentiate
-2 sin(2x)to get-2 cos(2x) * 2 = -4 cos(2x). Another factor of 2 appears, which is why the 4 in the equation is no coincidence. - Substitute into the left side:
y'' + 4y = -4 cos(2x) + 4 cos(2x) = 0. The right side is 0. They match for everyx, socos(2x)is a solution.
Notice the structure of the success: differentiating cos(2x) twice reproduces the original function scaled by -4, and the equation is built exactly to cancel that. Functions that return to themselves under differentiation, exponentials, sines, and cosines, are the heroes of this course for precisely this reason.
A check that fails, and why that is informative
Test the candidate y = cos(3x) in the same equation y'' + 4y = 0. The derivatives: y' = -3 sin(3x), then y'' = -9 cos(3x). Substituting, the left side is -9 cos(3x) + 4 cos(3x) = -5 cos(3x), which is not the zero function. It does equal zero at isolated points, for instance where cos(3x) = 0, but a solution must satisfy the equation on a whole interval, not at scattered spots. So cos(3x) fails, and the failure teaches something: the frequency inside the cosine must be matched to the coefficient in the equation. Only cos(2x) and sin(2x) fit with the 4.
Key idea: "equal at a point" is not "equal as functions." Verification demands agreement across the entire interval.
The test for linearity
A differential equation is linear if it can be written in the form
a_n(x) y^(n) + ... + a_1(x) y' + a_0(x) y = g(x)
Read that aloud slowly: some coefficient times the nth derivative, plus more coefficient-times-derivative terms, plus a coefficient times y, equals a function of x alone. The unknown y and its derivatives appear only to the first power, are never multiplied by each other, and sit inside no nonlinear function. The coefficients a_i(x) may depend on x in any way at all; that does not spoil linearity, because linearity is a rule about how the equation treats y, not about how it treats x.
A three-question scan settles most cases. Is any y or derivative raised to a power other than 1, like y^2 or (y')^3? Is a y-term multiplied by another y-term, like y y'? Is y wrapped inside a function, like sin(y), e^y, or ln(y)? One yes makes the equation nonlinear.
| Equation | Type | Reason |
| y' + x^2 y = cos(x) | Linear | y and y' are to the first power; x^2 is just a coefficient |
| y' = y^2 | Nonlinear | y appears squared |
| y y' = 1 | Nonlinear | y is multiplied by y' |
| y'' + sin(y) = 0 | Nonlinear | y sits inside a sine |
The first row deserves a second look, because it is the one students most often misjudge. The x^2 looks alarming, but it multiplies y from the outside, playing the same harmless role the constant 3 played in y' = 3y. Squaring the input variable is fine. Squaring the unknown is not. Compare x^2 y (linear) with y^2 (nonlinear) until the difference feels mechanical.
Why the linear label matters
The label is a promise about solvability. Linear first-order equations have a complete recipe, the integrating factor of Module 2, that always works. Linear second-order equations obey the superposition principle of Module 4, which lets us build every solution from two basic ones. Linear equations also come with a strong existence and uniqueness guarantee: when the coefficients and right side are continuous near the starting point, an initial value problem has exactly one solution there. Nonlinear equations enjoy none of these luxuries in general, which is why identifying linearity is always step zero of a solving strategy.
Initial value problems
An initial value problem (IVP) is a differential equation together with enough initial conditions to fix every arbitrary constant. A first-order equation carries one constant, so it needs one condition. A second-order equation carries two constants, so it needs two conditions, typically the value y(0) and the slope y'(0) at the same starting point. Physically, the pair says where the system starts and how fast it starts.
Worked example, first order. Solve the IVP y' = 3y, y(0) = 5.
- From the verification above, the general solution is
y = C e^(3x). - Apply the condition at
x = 0:y(0) = C e^(3 * 0) = C e^0 = C, ande^0 = 1, soy(0) = C. - The condition says
y(0) = 5, soC = 5.
The particular solution is y = 5 e^(3x). The initial condition collapsed an infinite family into the one curve that actually starts at 5.
Worked example, second order. Solve y'' + 4y = 0, y(0) = 3, y'(0) = 8. You will learn in Module 4 that the general solution is y = C_1 cos(2x) + C_2 sin(2x); here we practice using the two conditions.
- Apply
y(0) = 3. Sincecos(0) = 1andsin(0) = 0, we gety(0) = C_1, soC_1 = 3. - Differentiate the general solution:
y' = -2 C_1 sin(2x) + 2 C_2 cos(2x). - Apply
y'(0) = 8. At zero, the sine term vanishes and the cosine equals 1, leavingy'(0) = 2 C_2. So2 C_2 = 8andC_2 = 4.
The particular solution is y = 3 cos(2x) + 4 sin(2x). Notice the division of labor: the value condition caught C_1, and the slope condition caught C_2. Two constants, two facts, no leftovers.
The physical reading makes the two conditions memorable. If y is the position of a mass on a spring, then y(0) = 3 says the mass was pulled 3 centimeters from rest, and y'(0) = 8 says it was released with a push of 8 centimeters per second. Two different launches produce two different motions, even on the same spring, which is exactly why the mathematics demands two separate pieces of data.
Where people get stuck
Checking at one point only. Substituting x = 0 and declaring victory is the most common verification error. Keep x general all the way through; the sides must match as functions.
Losing the chain rule factor. Writing the derivative of cos(2x) as -sin(2x) instead of -2 sin(2x) wrecks second-order checks. Every derivative of cos(k x) or e^(k x) produces a factor of k.
Misreading coefficients as nonlinearity. An x^2 or even e^x multiplying y keeps the equation linear. Only powers, products, and wrappers applied to y and its derivatives break linearity.
Using both conditions on the value. In a second-order IVP, the two facts are y(0) and y'(0). Plugging both into the undifferentiated solution produces a contradiction. Differentiate first, then apply the slope condition.
Try it
Verify that y = x e^x solves y'' - 2y' + y = 0, then solve the IVP y' = 3y with y(0) = -2.
Worked answer, the verification. Use the product rule twice: y' = e^x + x e^x, and then y'' = e^x + (e^x + x e^x) = 2 e^x + x e^x. Substitute into the left side: (2 e^x + x e^x) - 2(e^x + x e^x) + x e^x. Collect the plain e^x terms: 2 - 2 = 0. Collect the x e^x terms: 1 - 2 + 1 = 0. The left side is 0 everywhere, so it checks.
Worked answer, the IVP. The general solution is y = C e^(3x), and y(0) = C = -2, so the particular solution is y = -2 e^(3x). Negative starting values are handled by the constant with no extra effort; the whole curve sits below the axis and still triples its slope wherever it goes. If both answers came out on the first pass, the substitution habit is in place.
Recap
Verification is substitution plus honest differentiation, and it must hold for all x. Linearity means y and its derivatives appear to the first power, unmultiplied and unwrapped, while the coefficients may involve x freely. An IVP supplies exactly as many conditions as the order of the equation, and each condition converts one arbitrary constant into a number. These three skills, checking, classifying, and pinning down constants, are the quiet machinery inside every solving method to come.
Sources
- Lebl, J. (n.d.). Introduction to differential equations. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Lebl, J. (n.d.). Integrals as solutions. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Herman, E., & Strang, G. (2016). Basics of differential equations. In Calculus Volume 2. OpenStax. openstax.org
- Khan Academy. (n.d.). First order differential equations. khanacademy.org
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- Mattuck, A., Miller, H., Orloff, J., & Lewis, J. (2010). 18.03 Differential equations [Course materials]. MIT OpenCourseWare. ocw.mit.edu
- Key terms
- Verify a solution
- Substitute a candidate function and its derivatives into the equation and check both sides agree.
- Linear equation
- An ODE where y and its derivatives appear only to the first power and inside no nonlinear function.
- Nonlinear equation
- An ODE containing a power, product, or nonlinear function of y or its derivatives.
- Initial value problem (IVP)
- A differential equation plus enough initial conditions to determine all constants.
- Coefficient
- A function multiplying y or a derivative; it may depend on the independent variable without breaking linearity.
Module 2: First-Order Equations
Master the two workhorse methods for first-order ODEs: separation of variables and integrating factors for linear equations.
Separable Equations
- Recognize when a first-order equation is separable.
- Solve a separable equation by separating variables and integrating both sides.
- Apply an initial condition to find the constant and the particular solution.
A first-order equation is separable if you can algebraically move all the y terms (including dy) to one side and all the x terms (including dx) to the other. In symbols, it can be written dy/dx = f(x) g(y), a product of a function of x alone and a function of y alone. Read that aloud once: the slope of the unknown curve equals something built from x times something built from y. Once separated, you integrate each side with respect to its own variable.
This is the first solving method of the course, and it sets the pattern that every later method follows: rearrange the equation into a shape that calculus can handle, integrate, keep honest track of the constant, and then let an initial condition pick one curve out of the family. The new work in this lesson is the rearranging; the integrating is Calculus 1, visiting in a new costume.
The big picture
Recall the speedometer picture from Lesson 1. A differential equation reports the speedometer reading, and solving recovers the odometer. For a separable equation, the report has a special multiplicative shape: the reading is a function of the clock times a function of the position. That structure is exactly what lets us untangle the two variables. We herd every y to the left, every x to the right, and then integrate each side as an ordinary one-variable integral.
Why is this worth celebrating? Because integration is a tool we already own. A differential equation mixes the unknown function and its derivative in one statement, which is unfamiliar territory. Separation converts that statement into two side-by-side Calculus 1 problems. After the conversion, nothing new is required except care with the constant and a final bit of algebra to solve for y.
Key idea: separable equations are the ones whose right side factors as (function of x) times (function of y). Factoring is the entry ticket; integration does the rest.
Why the separation step is legal
Writing dy/g(y) = f(x) dx treats dy/dx as if it were a genuine fraction, and it is fair to ask whether that move is honest. It is, and the reason is the chain rule. Start from the equation in the form (1/g(y)) (dy/dx) = f(x), which comes from dividing both sides by g(y). Now integrate both sides with respect to x. The right side becomes integral of f(x) dx, no surprises.
The left side is integral of (1/g(y)) (dy/dx) dx, and this is precisely the setup for u-substitution with u = y(x): the dy/dx dx collapses to dy. So the left side equals integral of (1/g(y)) dy. The fraction-like cancellation of dx is shorthand for a substitution you have done many times in calculus. The shorthand is safe, which is why every textbook uses it, but it is worth seeing the honest version once so the notation never feels like a trick.
Key idea: separating variables is u-substitution written in fast notation. The chain rule underwrites every separation you will ever do.
The method in three steps
- Separate: write the equation as
dy/g(y) = f(x) dx, gatheringyon the left andxon the right. - Integrate both sides. A single constant
Con one side captures the two constants of integration. - Solve for y if possible, then apply any initial condition to find
C.
A word about step 2, because the single constant sometimes bothers careful readers. Integrating the left side produces a constant C_1, and integrating the right side produces a constant C_2. Writing both would give an equation ending in + C_1 on one side and + C_2 on the other. Subtract C_1 from both sides and the two constants merge into the single number C_2 - C_1, which we rename C. One constant is not laziness; it is the honest sum of the bookkeeping.
Worked example one
Solve dy/dx = x y. Read it aloud: the slope equals the input times the current value. The right side factors as f(x) = x times g(y) = y, so the equation is separable.
- Separate: divide both sides by
yand multiply bydxto getdy/y = x dx. (Dividing byyassumesyis not zero; we will come back to that.) - Integrate both sides: the left gives
ln|y|, the right givesx^2/2, soln|y| = x^2/2 + C. - Exponentiate both sides to free
y:|y| = e^(x^2/2 + C) = e^C e^(x^2/2). Absorbing+/- e^Cinto a single constantAgivesy = A e^(x^2/2).
So the general solution is y = A e^(x^2/2). The absorbing step deserves a slow look, because it happens in nearly every separable problem. The number e^C is always positive, so on its own it could never produce a negative solution. Removing the absolute value introduces a plus-or-minus, and A = +/- e^C sweeps both signs into one letter. Allowing A = 0 as well quietly restores the solution y = 0 that the division in step 1 pushed aside. After the dust settles, A may be any real number.
Finish the way Lesson 2 of Module 1 taught: check by substitution. Differentiate y = A e^(x^2/2) using the chain rule: y' = A e^(x^2/2) * x = x (A e^(x^2/2)) = x y. The equation is satisfied for every A and every x. Three lines of solving, one line of checking, complete confidence.
Worked example two, with an initial condition
Solve the IVP dy/dx = -2x y^2, y(0) = 1. The right side factors as (-2x)(y^2), so we may separate.
- Separate:
dy/y^2 = -2x dx, that isy^(-2) dy = -2x dx. - Integrate: the left side gives
-1/y(the power rule with exponent -2), the right side gives-x^2, so-1/y = -x^2 + C. - Solve for y: multiply by
-1to get1/y = x^2 - C. Writing-Cas a new constantD,1/y = x^2 + D, soy = 1/(x^2 + D). - Apply
y(0) = 1:1 = 1/(0 + D), soD = 1.
The particular solution is y = 1/(x^2 + 1). You can check it: y' = -2x/(x^2 + 1)^2 = -2x y^2, exactly the right side. Notice this solution is defined for every x, because the denominator x^2 + 1 is never zero. That is a pleasant accident of this particular starting point, not a general promise.
Watch what a different launch does. Take the same equation with y(0) = -1. Then -1 = 1/D gives D = -1, so y = 1/(x^2 - 1). This function explodes where the denominator vanishes, at x = 1 and x = -1. The solution through our starting point lives only on the interval -1 < x < 1, the piece of the line containing x = 0. Same equation, different initial condition, dramatically different lifespan. This is the interval-of-validity issue from Lesson 1 arriving in the wild, and separable equations produce it often.
Key idea: the initial condition chooses the constant, and the constant can decide how far the solution survives.
A third example, where the answer stays implicit
Solve dy/dx = x/y, for y not zero. Separating gives y dy = x dx. Integrate both sides: y^2/2 = x^2/2 + C. Multiply through by 2 and rename 2C as K: the general solution is y^2 = x^2 + K, a family of hyperbolas (and, for K = 0, a pair of crossing lines).
Here the natural resting place is an implicit solution, an equation relating x and y without y alone on the left. Solving for y explicitly forces a choice: y = sqrt(x^2 + K) or y = -sqrt(x^2 + K), one branch above the axis and one below. An initial condition settles the branch. With y(0) = -2: substituting gives 4 = 0 + K, so K = 4, and since the starting value is negative we take the lower branch, y = -sqrt(x^2 + 4).
Check it, because checking is free: y' = -x/sqrt(x^2 + 4) by the chain rule, and x/y = x/(-sqrt(x^2 + 4)) = -x/sqrt(x^2 + 4). The two agree. Implicit answers are not failures; they are the honest output of the method whenever the y integral is not invertible by simple algebra. Leave a solution implicit unless the problem, or the algebra, invites you to do better.
Watch for lost solutions
Dividing by g(y) is only valid where g(y) is not zero. If g(y_0) = 0 for some constant, then the constant function y = y_0 is also a solution, an equilibrium solution, which the division step can hide. For dy/dx = x y, dividing by y quietly drops the solution y = 0. Always check separately whether any constant that zeroes g(y) is a valid solution.
The check costs one line. Set g(y) = 0 and solve for the constant candidates before you separate. Then substitute each candidate into the original equation: a constant function has derivative zero, so it solves the equation exactly when the right side is also zero there. For dy/dx = x y, the candidate y = 0 gives left side 0 and right side x * 0 = 0. It checks, so y = 0 belongs in the answer.
Sometimes the lost solution sneaks back into the family through the absorbed constant, as A = 0 did in example one, and no harm is done. But do not count on that mercy. In example two, the constant function y = 0 solves dy/dx = -2x y^2 (both sides are zero), yet no choice of D makes 1/(x^2 + D) equal to zero. There the equilibrium is genuinely missing from the family and must be reported alongside it. The complete general solution is y = 1/(x^2 + D) together with y = 0.
Key idea: every division is a promise that the divisor is not zero. Equilibrium solutions are where that promise fails, so list them first and check them separately.
Recognizing a separable equation
The method only applies when the right side truly factors, and the eye needs a little training to tell. Four quick verdicts, worth reading aloud. dy/dx = x + y: a sum, not a product; not separable (Lesson 4 of this module handles it another way). dy/dx = e^(x + y): the exponent rule e^(x+y) = e^x e^y reveals a product; separable. dy/dx = x y + x: factor out x to get x(y + 1); separable. dy/dx = x y + 1: no common factor, no product; not separable.
The working skill is factoring, the same one from algebra. Before declaring an equation not separable, spend a moment trying to factor the right side, and remember the exponential identity, which disguises more products than any other. When factoring fails, nothing is wrong with you or the equation; it is a signal to reach for the integrating-factor method of the next lesson, which covers the most important non-separable equations.
Where people get stuck
Adding the constant too late. The constant must appear at the moment of integration, before any exponentiating. Writing y = e^(x^2/2) + C for example one looks harmless but fails the check: its derivative is x e^(x^2/2), while x y would be x e^(x^2/2) + x C. The two agree only when C = 0. Attach C to the logarithm line, and it correctly becomes the multiplicative A.
Integrating both sides with respect to the same variable. After separating, the left side is integrated with respect to y and the right side with respect to x. Each side uses its own variable; that is the entire point of separating. Writing integral of dy/y dx is a sign the separation was not finished.
Dropping the absolute value carelessly. The integral of dy/y is ln|y|, not ln y. Keep the absolute value until the exponentiation step, where the plus-or-minus is absorbed into the constant. Skipping it usually still lands on the right family here, but the habit collapses in problems where signs carry physical meaning.
Forgetting the equilibrium check. Any constant with g(y) = 0 is a candidate solution that division hides. One line to find them, one line to check them.
Stopping at the general solution in an IVP. If the problem supplies y(x_0) = y_0, the expected answer is the particular solution, constant evaluated and gone.
Try it
Solve the IVP dy/dx = 2x(1 + y), y(0) = 0, and name the equilibrium solution the separation step temporarily hides.
Worked answer. The right side is already factored: f(x) = 2x, g(y) = 1 + y. Equilibrium first: 1 + y = 0 gives the constant candidate y = -1, and substituting confirms it (both sides zero). Now separate: dy/(1 + y) = 2x dx. Integrate both sides: ln|1 + y| = x^2 + C. Exponentiate: |1 + y| = e^C e^(x^2), and absorbing signs, 1 + y = A e^(x^2), so y = A e^(x^2) - 1.
Apply the initial condition: y(0) = A e^0 - 1 = A - 1 = 0, so A = 1, and the particular solution is y = e^(x^2) - 1. Check: y' = 2x e^(x^2), and 2x(1 + y) = 2x(1 + e^(x^2) - 1) = 2x e^(x^2). Both sides match, and the starting value y(0) = e^0 - 1 = 0 is correct. If your work matches, the separable method is fully in hand.
Recap
A separable equation is one whose right side factors into a function of x times a function of y. The method is: separate, integrate each side with respect to its own variable, add one constant at the moment of integration, then solve for y when the algebra allows and apply any initial condition. The fraction-style manipulation of dy/dx is u-substitution in fast notation, so the method rests on the chain rule, not on a trick.
Three habits complete the skill. Hunt for equilibrium solutions before dividing, because division hides them and the family does not always take them back. Expect implicit solutions sometimes, and treat them as finished answers unless algebra frees y cleanly. And check the interval of validity when denominators or logarithms appear, since the same equation can produce solutions with very different lifespans. Next lesson: the equations that refuse to factor, and the integrating factor that solves them anyway.
Sources
- Lebl, J. (n.d.). Separable equations. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Herman, E., & Strang, G. (2016). Separable equations. In Calculus Volume 2. OpenStax. openstax.org
- Dawkins, P. (n.d.). Separable Equations. Paul's Online Math Notes, Lamar University. tutorial.math.lamar.edu
- Khan Academy. (n.d.). First order differential equations. khanacademy.org
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- Mattuck, A., Miller, H., Orloff, J., & Lewis, J. (2010). 18.03 Differential equations [Course materials]. MIT OpenCourseWare. ocw.mit.edu
- Key terms
- Separable equation
- A first-order ODE that can be written as dy/dx = f(x) g(y).
- Separate variables
- Rearranging so all y terms and dy are on one side and all x terms and dx on the other.
- Constant of integration
- The arbitrary constant that appears when both sides are integrated.
- Equilibrium solution
- A constant solution y = y0 that occurs where g(y) equals zero.
- Exponentiate
- Apply e^ to both sides to undo a natural logarithm and solve for y.
Linear First-Order Equations and Integrating Factors
- Put a linear first-order equation into standard form.
- Compute the integrating factor and use it to solve the equation.
- Solve a linear initial value problem completely.
Many first-order equations are linear but not separable, such as y' + 2y = e^x. Try to factor its right side after moving terms around and you will find x and y tangled in a sum that no algebra untangles. For these there is a reliable, universal method: the integrating factor. The whole idea is to multiply the equation by a cleverly chosen function that turns the left side into the derivative of a single product, which you can then undo by integrating.
That one sentence is the entire lesson, so read it once more, slowly: multiply by a special function, watch the left side collapse into one derivative, integrate both sides, divide. Everything below is the careful version of those four moves, plus the reason the special function exists at all.
The big picture
Separation solved equations whose right side factored. Linearity is a different kind of niceness: the equation y' + P(x) y = Q(x) treats y and y' gently (first power, no products, no wrappers), even though x may appear in complicated coefficients. Lesson 2 of Module 1 promised that linear equations come with a complete recipe. This lesson delivers the recipe, and it works for every linear first-order equation whose coefficients we can integrate, whether or not separation also happens to apply.
The obstacle is that the left side, y' + P y, is two terms that do not integrate as they stand. The integral of y' is y, fine, but the integral of P(x) y(x) is unknowable while y is unknown. The trick is to stop trying to integrate the pieces and instead reshape the whole left side into something whose integral is visible at a glance: the derivative of a single product. Products have a well-known derivative rule, and we will run it backward.
Key idea: the integrating factor manufactures a product-rule pattern on the left side, so the entire side integrates in one step.
Step 1, standard form
Write the equation as
y' + P(x) y = Q(x)
with a coefficient of exactly 1 on y'. If some other factor multiplies y', divide the whole equation by it first.
This step is not cosmetic. The formula in step 2 reads P(x) straight off the standard form, so an equation like x y' + y = 4x must first become y' + (1/x) y = 4 before P = 1/x can be identified. Notice also that P carries its sign: in y' - 3y = 6, the standard-form coefficient is P = -3, not 3. Reading P and Q aloud before computing anything is a thirty-second habit that prevents most errors in this method.
Step 2, the integrating factor
Define the integrating factor
mu(x) = e^(integral of P(x) dx)
The magic of this choice is that after multiplying the equation by mu, the entire left side collapses into d/dx [mu(x) y]. That happens because mu' = P mu by construction, so the product rule reproduces exactly mu y' + P mu y, which is the left side scaled by mu.
Where does the formula come from? Work backward from the goal. We want a multiplier mu so that mu y' + mu P y matches the product-rule expansion d/dx [mu y] = mu y' + mu' y. Compare the two expressions term by term: the mu y' pieces already agree, so the match succeeds exactly when mu' = P mu.
That is a differential equation for mu, and a separable one we can solve with last lesson's method: d(mu)/mu = P dx, so ln|mu| = integral of P dx, giving mu = e^(integral of P dx). The recipe is not handed down from anywhere; it is the unique shape a collapsing multiplier must have.
One refinement: no constant of integration is needed inside mu. Adding one would multiply mu by a nonzero number, and that number would multiply both sides of the equation identically and cancel in the final division. Any one integrating factor works, so we take the tidiest.
Key idea: mu is chosen to satisfy mu' = P mu, and solving that little separable equation is what produces the formula e^(integral of P dx).
Step 3, integrate and solve
The equation becomes d/dx [mu y] = mu Q. Integrate both sides and divide by mu:
y = (1/mu) [ integral of mu(x) Q(x) dx + C ]
Keep the order of operations in view: the constant C is born when you integrate, before you divide by mu. That is why the general solution always ends with a term C/mu(x), and that term is exactly the general solution of the associated homogeneous equation y' + P y = 0. The structure previews Module 5: a solution driven by Q, plus a family of free responses tagged by C.
Worked example
Solve y' + 2y = e^x.
- Already in standard form with
P(x) = 2andQ(x) = e^x. - Integrating factor:
mu = e^(integral of 2 dx) = e^(2x). - Multiply through:
e^(2x) y' + 2 e^(2x) y = e^(2x) e^x = e^(3x). The left side isd/dx [e^(2x) y]. - Integrate:
e^(2x) y = integral of e^(3x) dx = (1/3) e^(3x) + C. - Divide by
e^(2x):y = (1/3) e^x + C e^(-2x).
So y = (1/3) e^x + C e^(-2x). The first piece is driven by Q(x); the second, C e^(-2x), is the decaying solution of the associated equation y' + 2y = 0.
Check it, the Lesson 2 way. Differentiate: y' = (1/3) e^x - 2C e^(-2x). Then y' + 2y = (1/3) e^x - 2C e^(-2x) + (2/3) e^x + 2C e^(-2x) = e^x. The C terms cancel completely, which is the algebra confirming that C e^(-2x) contributes nothing to the forcing. And notice the long-run story: as x grows, C e^(-2x) fades regardless of C, so every solution in the family hugs the same curve (1/3) e^x. Different starting values, same eventual behavior.
Worked example with an initial condition
Solve the IVP x y' + y = 4x, y(1) = 3, for x > 0.
- Divide by
xto reach standard form:y' + (1/x) y = 4. SoP = 1/x,Q = 4. - Integrating factor:
mu = e^(integral of (1/x) dx) = e^(ln x) = x. - Multiply:
x y' + y = 4x. The left side isd/dx [x y]. (Here the original equation was already in this convenient form.) - Integrate:
x y = integral of 4x dx = 2x^2 + C, soy = 2x + C/x. - Apply
y(1) = 3:2(1) + C = 3, soC = 1.
The particular solution is y = 2x + 1/x. The integrating factor turns any linear first-order equation into a single integration, which is why it is the standard tool.
Two details in that computation repay attention. First, e^(ln x) = x: the exponential and the logarithm are inverse functions, so they cancel, and integrating factors involving 1/x coefficients regularly simplify this way. (We wrote ln x rather than ln|x| because the problem restricts to x > 0.) Second, step 3 showed the multiplied equation matching the original exactly; that is a coincidence of this example, and a pleasant one, since it means the original left side was already a perfect derivative in disguise.
A worked example where the factor uses a logarithm
Solve y' - (2/x) y = x^2 for x > 0. Standard form is already present, with P = -2/x and Q = x^2; note the built-in minus sign.
- Integrating factor:
integral of (-2/x) dx = -2 ln x, somu = e^(-2 ln x) = e^(ln(x^(-2))) = x^(-2) = 1/x^2. The log rulea ln b = ln(b^a)did the simplifying. - Multiply through by
1/x^2: the left side collapses tod/dx [y/x^2], and the right side isx^2/x^2 = 1. - Integrate:
y/x^2 = integral of 1 dx = x + C. - Multiply by
x^2:y = x^3 + C x^2.
Check: y' = 3x^2 + 2C x, and (2/x) y = 2x^2 + 2C x, so y' - (2/x) y = 3x^2 + 2C x - 2x^2 - 2C x = x^2. It matches. Integrating factors built from 1/x coefficients nearly always reduce to powers of x, and recognizing e^(k ln x) = x^k is the skill that keeps them tidy.
Where people get stuck
Reading P before reaching standard form. In x y' + y = 4x, the coefficient of y looks like 1, but P is defined only after the equation is divided by x. Divide first, then read P = 1/x. Likewise P includes its sign: for y' - 3y = 6, P = -3 and mu = e^(-3x).
Adding a constant inside the integrating factor. Writing mu = e^(x^2 + C) style factors clutters the algebra for no gain; any single antiderivative of P serves, because a constant multiple of mu cancels in the end. Save C for step 3, where it genuinely matters.
Recomputing the left side the long way. After multiplying by mu, the left side is d/dx [mu y] by design, every time. If your multiplied left side does not collapse, check the integrating factor, because the collapse is the whole point, not a lucky event.
Losing the C/mu term. The constant appears when you integrate, so it gets divided by mu along with everything else. Writing y = (1/mu) integral of mu Q dx + C, with C outside the division, produces a family that fails the check. The safe habit is to write the + C on the integrated line, then divide the entire line.
Leaving e^(ln x) unsimplified. Factors like e^(ln x) = x and e^(-2 ln x) = 1/x^2 are meant to be simplified before multiplying through. Carrying them unsimplified makes every later line harder to read and to integrate.
Try it
Solve the IVP y' + 2y = 4, y(0) = 3, and describe what happens to the solution as x grows.
Worked answer. Standard form is ready, with P = 2, Q = 4. The integrating factor is mu = e^(integral of 2 dx) = e^(2x). Multiply through: d/dx [e^(2x) y] = 4 e^(2x). Integrate both sides: e^(2x) y = 2 e^(2x) + C, since the integral of 4 e^(2x) is 4 * (1/2) e^(2x) = 2 e^(2x). Divide by e^(2x): y = 2 + C e^(-2x).
Apply the condition: y(0) = 2 + C = 3, so C = 1 and the particular solution is y = 2 + e^(-2x). Check: y' = -2 e^(-2x), and y' + 2y = -2 e^(-2x) + 4 + 2 e^(-2x) = 4. As x grows, the transient e^(-2x) dies away and y settles toward the constant 2, which is exactly the equilibrium where y' = 0 forces 2y = 4. Solving, checking, and interpreting: that is the complete package.
Recap
Every linear first-order equation surrenders to the same four moves. Put it in standard form y' + P y = Q, with coefficient 1 on y' and the sign of P intact. Build mu = e^(integral of P dx), the one multiplier that makes the left side a perfect product-rule derivative, a fact you can rederive on demand from mu' = P mu. Multiply, collapse, and integrate, attaching C at that moment. Divide by mu to finish, and apply any initial condition.
The answer always arrives in two parts: a response shaped by the forcing Q, plus a C/mu family inherited from the homogeneous equation. When the homogeneous part decays, all solutions forget their starting values and converge to shared long-run behavior, a pattern the models of the next two lessons, heating, cooling, and mixing, will make physical. Between separation and integrating factors, you now hold a complete toolkit for the first-order equations of this course.
Sources
- Lebl, J. (n.d.). Linear equations and the integrating factor. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Herman, E., & Strang, G. (2016). First-order linear equations. In Calculus Volume 2. OpenStax. openstax.org
- Dawkins, P. (n.d.). Linear Differential Equations. Paul's Online Math Notes, Lamar University. tutorial.math.lamar.edu
- Khan Academy. (n.d.). First order differential equations. khanacademy.org
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- Mattuck, A., Miller, H., Orloff, J., & Lewis, J. (2010). 18.03 Differential equations [Course materials]. MIT OpenCourseWare. ocw.mit.edu
- Key terms
- Standard form
- A linear first-order equation written as y' + P(x) y = Q(x) with coefficient 1 on y'.
- Integrating factor
- The function mu(x) = e^(integral of P dx) that turns the left side into a single derivative.
- Associated homogeneous equation
- The related equation y' + P(x) y = 0 whose solution gives the C e^(...) term.
- Product rule collapse
- The step where mu y' + P mu y is recognized as d/dx of mu times y.
- Standard-form coefficient
- P(x), the function multiplying y once y' has coefficient 1.
Module 3: Modeling with First-Order Equations
Turn real situations into first-order ODEs: exponential growth and decay, Newton's law of cooling, and mixing tanks.
Exponential Growth and Decay
- Derive and solve the growth-decay equation dy/dt = k y.
- Interpret the sign of k and compute doubling time and half-life.
- Fit a model to two data points.
The simplest and most important model in the whole course says that a quantity changes at a rate proportional to its current amount. Whether it is bacteria dividing, money earning continuous interest, or a radioactive sample decaying, the equation is the same:
dy/dt = k y
Read it aloud: the rate of change of y equals a constant times y itself. This lesson is where the solving skills of Module 2 first earn their keep on real questions: how fast does an investment double, how old is an ancient bone, how long until a dose of medicine is half gone.
The big picture
Why should so many different things obey one equation? Because in each case the whole is a crowd of independent pieces, and each piece contributes the same little bit of change. Every bacterium divides on its own schedule, so twice the bacteria produce twice the new cells per hour. Every dollar earns the same interest, so twice the balance earns twice the interest per year. Every carbon-14 atom has the same small chance of decaying this second, so twice the atoms produce twice the decays. Rate proportional to amount is the signature of independent pieces acting alike.
The proportionality constant k is the personality of the model. Its sign points the direction: k > 0 means growth, k < 0 means decay. Its size sets the speed, and its units are 1 over time (per hour, per year), so that k t in the exponent is a pure number. A statement like k = 0.03 per year is read: the quantity grows at 3 percent of its current size per year, continuously compounded.
Key idea: one differential equation covers every situation built from many identical, independent contributors. Only k and the starting amount change from story to story.
Solving the equation, every step shown
This is separable. Separating and integrating, dy/y = k dt gives ln|y| = k t + C, and exponentiating gives the solution
y(t) = y_0 e^(k t)
where y_0 = y(0) is the starting amount. The constant k is the relative growth rate. If k > 0 the quantity grows; if k < 0 it decays.
Walk the steps once with full care, because this derivation is the template for the next lesson too. Dividing by y assumes y is not zero; the constant function y = 0 is the equilibrium solution, a population that never existed and never will. Integrating gives ln|y| = k t + C. Exponentiating, |y| = e^C e^(k t), and absorbing the sign into a constant A = +/- e^C gives y = A e^(k t). Setting t = 0 shows A = y(0), which is why the constant deserves the name y_0. Every symbol in y_0 e^(k t) now has a meaning you can defend.
Check by substitution, as always: the derivative of y_0 e^(k t) is y_0 k e^(k t) = k (y_0 e^(k t)) = k y. The equation is satisfied for every t.
Doubling time and half-life
For growth, the doubling time is the time for the amount to double. Set y = 2 y_0: 2 y_0 = y_0 e^(k t), so e^(k t) = 2, giving t = ln(2)/k. For decay, the half-life solves e^(k t) = 1/2, giving t = ln(2)/(-k) (positive because k < 0). Both depend only on k, not on the starting amount.
Slow down at the middle step, because it explains a famous fact. When we set 2 y_0 = y_0 e^(k t), the starting amount y_0 divides out of both sides before we ever take a logarithm. That cancellation is the algebra behind the claim that doubling time is a property of the growth rate alone. A colony of 500 and a colony of 5 million, growing with the same k, double on exactly the same clock. For decay the same cancellation happens, and note the sign bookkeeping: ln(1/2) = -ln(2), so the minus signs cancel and the half-life comes out positive, as a time should.
Half-lives stack neatly. After one half-life, half remains; after two, a quarter; after n half-lives, the fraction (1/2)^n. This turns many decay questions into counting: 75 years with a 30-year half-life is 2.5 half-lives, no integral required.
Key idea: t = ln(2)/|k| converts between the rate constant and the doubling or halving clock, in either direction.
Worked example, population growth
A bacteria culture starts at 500 cells and grows to 800 in 2 hours. Find the model and the population at 5 hours.
- Model:
y(t) = 500 e^(k t). - Use the second data point:
800 = 500 e^(2k), soe^(2k) = 1.6, giving2k = ln(1.6)andk = ln(1.6)/2 approximately 0.235per hour. - At
t = 5:y(5) = 500 e^(0.235 * 5) = 500 e^(1.175) approximately 500 (3.238) approximately 1619cells.
This is the standard two-point fit: the first data point sets y_0, the second sets k. Notice the order of moves in step 2. Divide by 500 first, so the exponential stands alone, and only then take the natural logarithm of both sides. Taking logarithms too early, while the 500 still multiplies the exponential, invites the classic error ln(800) = ln(500) + 2k done sloppily. Isolate, then log.
Sanity-check the answer with the doubling clock: t = ln(2)/0.235 approximately 2.95 hours. In 5 hours the colony completes not quite two doublings, so it should land a bit under 500 * 4 = 2000. Our 1619 sits exactly in that window. A ten-second estimate like this catches misplaced decimal points more reliably than redoing the whole computation.
Worked example, radioactive decay
Carbon-14 has a half-life of about 5730 years. Find k and the fraction remaining after 2000 years.
- Half-life:
1/2 = e^(k * 5730), sok = ln(1/2)/5730 = -ln(2)/5730 approximately -0.000121per year. - After 2000 years:
y/y_0 = e^(-0.000121 * 2000) = e^(-0.242) approximately 0.785, so about 78.5 percent remains.
This exact calculation, run in reverse, is the basis of radiocarbon dating. The same equation, one constant, and two data points solve a remarkable range of real problems.
Here is the reverse run in full. Living things constantly exchange carbon with the air, so their carbon-14 fraction holds steady while they live. At death the exchange stops and the clock starts: the carbon-14 decays with k approximately -0.000121 per year and nothing replaces it. Suppose a bone fragment retains 60 percent of the living-tissue level. Solve 0.60 = e^(k t): take logarithms to get ln(0.60) = k t, so t = ln(0.60)/k approximately (-0.511)/(-0.000121) approximately 4220 years. The fossil dates to roughly four millennia ago, computed from nothing but a ratio and a half-life.
Continuous interest, the same equation in a bank
Money compounding continuously at annual rate r obeys dA/dt = r A, the growth equation wearing financial clothes, with solution A = A_0 e^(r t). At r = 0.03 per year, the doubling time is ln(2)/0.03 approximately 23.1 years. Bankers approximate this with the rule of 70: doubling time is roughly 70 divided by the percentage rate, and 70/3 approximately 23.3 agrees closely. The rule works because ln(2) approximately 0.693, and 70 is a rounder number than 69.3.
The comparison with the bacteria example is worth pausing on. Cells at k = 0.235 per hour double every 2.95 hours; money at k = 0.03 per year doubles every 23.1 years. Same mathematics, wildly different clocks, and in both cases the doubling time reads directly off k.
Medicine offers the decay-side twin. Many drugs are cleared from the bloodstream at a rate proportional to the concentration present, so a dose follows y = y_0 e^(k t) with k < 0. A medication with a 6-hour half-life sits at one quarter strength after 12 hours and one eighth after 18, which is exactly why dosing schedules repeat on a fixed clock. Pharmacists compute with the same ln(2)/|k| conversion you now own.
Where people get stuck
Using the percent as k. A rate of 3 percent per year means k = 0.03, not 3. Substituting 3 produces doubling in a quarter of a year, which the sanity check would catch instantly.
Mixing time units. If k is per hour, then t must be in hours. A k fitted from a 2-hour observation, applied to minutes without conversion, inflates every answer. Write the units next to k once and the mismatch becomes visible.
Expecting the start to matter. Doubling time and half-life are independent of y_0; the cancellation in the derivation is the proof. If your half-life formula still contains y_0, an algebra step went astray.
Rounding k too early. The coffee-and-culture trick is to keep exact expressions as long as possible: in the population example, e^(2k) = 1.6 exactly, so e^(4k) = 1.6^2 = 2.56 exactly, with no decimal drift. Round once, at the end.
Sign slips in decay. For decay, k is negative and ln of a fraction is negative; the two minuses cancel in any time answer. A negative number of years is the standard symptom of dropping one of them.
Try it
A 10 gram sample of an isotope has a half-life of 30 years. Find k, the amount left after 75 years, and the time until only 1 gram remains.
Worked answer, one piece at a time. The rate constant: k = -ln(2)/30 approximately -0.0231 per year. After 75 years, count half-lives: 75/30 = 2.5 of them, so the fraction left is (1/2)^2.5 approximately 0.177, giving 10 * 0.177 = 1.77 grams. The formula agrees: 10 e^(-0.0231 * 75) = 10 e^(-1.733) approximately 1.77 grams.
For the last part, solve 1 = 10 e^(k t). Divide by 10 to isolate the exponential: 0.1 = e^(k t). Take logarithms: ln(0.1) = k t, so t = ln(0.1)/(-0.0231) approximately (-2.303)/(-0.0231) approximately 99.7 years, call it a century. Cross-check with half-life counting: reaching one tenth takes about 3.32 halvings (because 2^3.32 approximately 10), and 3.32 * 30 = 99.6 years. Two independent routes, one answer, which is what being right usually looks like.
Recap
The equation dy/dt = k y says growth or decay is proportional to the amount present, and its solution y = y_0 e^(k t) follows from separation with every constant accounted for. The constant k carries the story: sign for direction, size for speed, units of 1 over time. Doubling time and half-life are ln(2)/|k|, independent of the starting amount because y_0 cancels in the derivation.
The working method is always the same two-point fit: use the starting value to set y_0, use one later measurement to set k (isolate the exponential, then take logarithms), and only then answer questions about other times. Keep expressions exact until the final line, and finish with a doubling-clock estimate as a sanity check. Next lesson the same machinery models cooling drinks and mixing tanks, where the equation gains one extra term and the story gains a destination.
Sources
- Lebl, J. (n.d.). Integrals as solutions. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Lebl, J. (n.d.). Autonomous equations. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Herman, E., & Strang, G. (2016). The logistic equation. In Calculus Volume 2. OpenStax. openstax.org
- Dawkins, P. (n.d.). Modeling with First Order Differential Equations. Paul's Online Math Notes, Lamar University. tutorial.math.lamar.edu
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- O'Connor, J. J., & Robertson, E. F. (n.d.). Leonhard Euler. MacTutor History of Mathematics Archive, University of St Andrews. mathshistory.st-andrews.ac.uk
- Key terms
- Relative growth rate
- The constant k in dy/dt = k y; positive for growth, negative for decay.
- Exponential model
- The solution y(t) = y0 e^(k t) of the growth-decay equation.
- Doubling time
- The time for a growing quantity to double, equal to ln(2)/k.
- Half-life
- The time for a decaying quantity to halve, equal to ln(2)/|k|.
- Initial amount
- The value y0 = y(0) that scales the exponential.
Newton's Law of Cooling and Mixing Problems
- Set up and solve Newton's law of cooling as a linear ODE.
- Model a mixing tank with a first-order equation for the amount of solute.
- Interpret the long-run behavior of each model.
Two classic models push our first-order methods a little further. Both lead to linear equations that also happen to be separable. More importantly, both introduce a new plot element: a destination. Last lesson's quantities grew forever or decayed to nothing. A cooling drink does neither; it heads for room temperature and stays. A mixing tank heads for a definite salt level and stays. The mathematics of arriving somewhere is this lesson's real subject.
The big picture
Both models obey the same sentence: the rate of change is proportional to the gap between where you are and where you are headed. For temperature, the gap is between the object and the room. For the tank, the gap is between the current salt amount and the amount the inflow can sustain. When the gap is large, change is fast; as the gap shrinks, change slows; at the destination, change stops. That is why a nearly cool coffee cools so slowly and a nearly full tank fills its last grams so lazily.
Once you see the gap structure, the solution method is last lesson's exponential wearing a shifted costume. The gap itself decays exponentially, so the quantity equals the destination plus a shrinking exponential correction. Every formula in this lesson has the shape: destination, plus (start minus destination) times e^(-k t). Hold that template and the algebra below becomes bookkeeping.
Key idea: rate proportional to the gap means the gap decays exponentially. The quantity lands at the destination in the limit, never crossing it.
Newton's law of cooling
Newton's law of cooling says an object's temperature changes at a rate proportional to the difference between the object and its surroundings. If T(t) is the object's temperature and T_s the constant surrounding temperature, then
dT/dt = -k (T - T_s), with k > 0.
The minus sign makes a hot object cool and a cold object warm, always toward T_s. Confirm that with signs alone, no solving needed. Hot object: T > T_s, so T - T_s > 0, and the minus makes dT/dt < 0: temperature falls. Cold object: T - T_s < 0, two minuses give dT/dt > 0: temperature rises. One equation, both directions, correct in each.
Separating variables with u = T - T_s (so du = dT) gives du/u = -k dt, hence u = u_0 e^(-k t), that is
T(t) = T_s + (T_0 - T_s) e^(-k t).
The substitution deserves a slow read, because it is the bridge to last lesson. The new variable u is the gap between object and room. Since T_s is constant, u and T change at identical rates, so the cooling law becomes du/dt = -k u: the gap obeys pure exponential decay, exactly the equation we solved before. The gap halves on a fixed clock, halves again, and never quite reaches zero. Translating back, T is the room temperature plus a decaying gap, which is the destination-plus-correction template announced above.
As t grows, e^(-k t) to 0, so T to T_s: the object approaches room temperature, exactly as experience predicts.
Worked example. A cup of coffee at 90 degrees sits in a 20 degree room and cools to 70 degrees in 10 minutes. Find its temperature after 20 minutes.
- Model:
T = 20 + (90 - 20) e^(-k t) = 20 + 70 e^(-k t). - Use
T(10) = 70:70 = 20 + 70 e^(-10k), so50 = 70 e^(-10k), givinge^(-10k) = 5/7andk = -ln(5/7)/10 = ln(7/5)/10 approximately 0.0336. - At
t = 20:e^(-20k) = (e^(-10k))^2 = (5/7)^2 = 25/49, soT(20) = 20 + 70 (25/49) approximately 20 + 35.7 = 55.7degrees.
Step 3 contains a habit worth stealing. We never used the decimal value of k at all. Twenty minutes is two ten-minute intervals, and each interval multiplies the gap by the same exact factor 5/7, so the 20-minute factor is (5/7)^2 with no rounding anywhere. In every exponential model, doubling the elapsed time squares the decay factor, tripling cubes it. Reach for that structure before reaching for a calculator.
One more question the model can answer: when does the coffee reach 30 degrees? Set 30 = 20 + 70 e^(-k t), so e^(-k t) = 10/70 = 1/7, giving t = ln(7)/k approximately 1.946/0.0336 approximately 58 minutes. Notice the question "when" always ends in a logarithm, while "what temperature" ends in an exponential. And the model quietly reminds you of its honesty: T = 20 exactly is unreachable, since e^(-k t) never equals zero; the coffee spends forever closing the last sliver of gap.
Key idea: fit k from one timed measurement, keep the decay factor exact, and square or cube it for doubled or tripled times.
Mixing problems
Imagine a tank holding a well-stirred solution, with liquid flowing in and out. Let A(t) be the amount of solute (say salt) in the tank. The governing principle is a balance:
dA/dt = (rate in) - (rate out).
Each rate is a concentration times a flow rate. The rate in is the inflow concentration times the inflow speed. The rate out is the tank's current concentration, A/V where V is the volume, times the outflow speed.
Check the units before anything else: concentration in grams per liter, flow in liters per minute, so each product is grams per minute, matching dA/dt. The phrase well-stirred is doing real work in the setup. It promises the salt is spread evenly, so the water leaving carries exactly the tank's average concentration A/V. Without stirring, the outflow concentration would depend on where the drain sits, and no single ODE could describe it. Every modeling subject has assumptions like this; good practice is to say them out loud.
Worked example. A 100 liter tank holds pure water. Brine with 2 grams of salt per liter flows in at 5 liters per minute, and the well-mixed solution flows out at 5 liters per minute (so volume stays 100 L). Find A(t).
- Rate in:
2 grams/L * 5 L/min = 10 grams/min. - Rate out: concentration
A/100times5, that is5A/100 = A/20 grams/min. - Equation:
dA/dt = 10 - A/20. In standard linear form,A' + (1/20) A = 10. - Integrating factor
mu = e^(t/20):d/dt [e^(t/20) A] = 10 e^(t/20), soe^(t/20) A = 200 e^(t/20) + C, givingA = 200 + C e^(-t/20). - Initial condition
A(0) = 0(pure water):0 = 200 + C, soC = -200.
Thus A(t) = 200 (1 - e^(-t/20)). As t to infinity, A to 200 grams, which matches intuition: the tank eventually reaches the inflow concentration of 2 grams per liter times 100 liters.
Here is the delightful shortcut: the destination was knowable before any solving. Set dA/dt = 0 in the balance equation: 10 - A/20 = 0 forces A = 200. The equilibrium of the equation is the long-run salt load. Solving the ODE adds the schedule: after 20 minutes (one time constant), A = 200(1 - e^(-1)) approximately 126 grams, about 63 percent of the way there; after 60 minutes, 200(1 - e^(-3)) approximately 190 grams. The tank covers most of the distance early and dawdles over the finish, exactly like the coffee.
You can even rewrite the tank equation in cooling-law clothing: dA/dt = 10 - A/20 = -(1/20)(A - 200). Rate proportional to the gap from 200, with k = 1/20. The two sections of this lesson were one equation all along, and the solution template, destination plus decaying correction, reads off instantly: A = 200 + (0 - 200) e^(-t/20).
Key idea: find the equilibrium by setting the rate to zero, then let the exponential describe the approach. If inflow and outflow speeds differ, the volume V(t) changes over time and must be written as a function of t in the rate-out term; the constant-volume case here is the clean first step.
Where people get stuck
Dropping or misplacing the minus sign. Writing dT/dt = k(T - T_s) with k > 0 makes hot drinks hotter forever. Run the sign check in both directions before solving; it takes ten seconds and is a complete proof of the setup.
Confusing the two temperatures. T_s is the room, the destination; T_0 is the start. In the template T_s + (T_0 - T_s) e^(-k t), the destination sits outside the parentheses. Swapping them produces a coffee that heats toward 90.
Using the inflow concentration in the rate out. The outflow carries the tank's own concentration A/V, not the brine's. The rate in uses the inflow concentration; the rate out uses the current mixture. Mixing these up erases the whole dynamics.
Treating V as constant when the flows differ. With inflow 5 and outflow 3 liters per minute, the volume grows by 2 each minute, so the rate out is 3A/(100 + 2t). Check the two flow speeds before writing A/V.
Rounding k early. The exact factor 5/7 squared cleanly; the rounded 0.0336 would have dragged decimal noise through every later line. Keep ratios exact until the final evaluation.
Try it
A bowl of soup at 80 degrees sits in a 20 degree room, with k = 0.05 per minute. Find the temperature after 10 minutes, and the time for the soup to reach 40 degrees.
Worked answer. The template gives T = 20 + (80 - 20) e^(-0.05 t) = 20 + 60 e^(-0.05 t). At t = 10: T = 20 + 60 e^(-0.5) approximately 20 + 60(0.6065) approximately 56.4 degrees. For the time question, set 40 = 20 + 60 e^(-0.05 t). Subtract 20: 20 = 60 e^(-0.05 t), so e^(-0.05 t) = 1/3. Take logarithms: -0.05 t = ln(1/3) = -ln(3), so t = ln(3)/0.05 approximately 1.099/0.05 approximately 22 minutes.
Interpret before moving on: the soup sheds its first 24 degrees (from 80 to 56.4) in ten minutes, then needs about twelve more minutes to shed the next 16. Shrinking gap, slowing change, the signature of this whole family of models. If both of your answers match, you are modeling, solving, and reading the physics correctly.
Recap
Newton's law of cooling, dT/dt = -k(T - T_s), and the mixing balance, dA/dt = rate in - rate out, are one idea in two costumes: rate proportional to the gap from a destination. The gap substitution u = T - T_s turns cooling into pure exponential decay, giving T = T_s + (T_0 - T_s) e^(-k t). The tank equation is linear, surrenders to the integrating factor, and lands on A = 200(1 - e^(-t/20)) in our example, with the equilibrium readable in advance by setting the rate to zero.
The working skills: check signs by narrating hot and cold, guard units in every rate, use the tank's own concentration on the way out, keep decay factors exact across doubled times, and answer "when" questions with logarithms. Module 4 next raises the order: equations with second derivatives, where springs oscillate and the characteristic equation makes its entrance.
Sources
- Lebl, J. (n.d.). Linear equations and the integrating factor. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Lebl, J. (n.d.). Autonomous equations. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Dawkins, P. (n.d.). Modeling with First Order Differential Equations. Paul's Online Math Notes, Lamar University. tutorial.math.lamar.edu
- Herman, E., & Strang, G. (2016). First-order linear equations. In Calculus Volume 2. OpenStax. openstax.org
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- O'Connor, J. J., & Robertson, E. F. (n.d.). Sir Isaac Newton. MacTutor History of Mathematics Archive, University of St Andrews. mathshistory.st-andrews.ac.uk
- Key terms
- Newton's law of cooling
- dT/dt = -k(T - Ts); temperature changes at a rate proportional to the gap to the surroundings.
- Surrounding temperature
- The constant ambient temperature Ts that the object approaches.
- Mixing problem
- A model tracking the amount of solute in a stirred tank with inflow and outflow.
- Rate in minus rate out
- The balance law dA/dt = (inflow rate) - (outflow rate) for the solute.
- Concentration
- Amount of solute per unit volume, A/V for the tank's current mixture.
Module 4: Second-Order Linear Equations - Homogeneous
Solve second-order linear equations with constant coefficients using the characteristic equation and its three root cases.
Structure of Second-Order Linear Equations
- State the form of a second-order linear equation and the meaning of homogeneous.
- Explain linear independence and the role of the general solution as a combination of two solutions.
- Set up the characteristic equation for a constant-coefficient equation.
Second-order linear equations model any system with inertia and a restoring force, from a vibrating spring to an electrical circuit. The general constant-coefficient form is
a y'' + b y' + c y = g(x)
with constants a, b, c and a not zero. The equation is homogeneous when g(x) = 0, meaning there is no external driving term, and nonhomogeneous when g(x) is present. This module handles the homogeneous case, the essential foundation.
Read the form aloud once: a constant times the acceleration, plus a constant times the velocity, plus a constant times the position, equals some outside influence. The physics is visible in the grammar. Newton's second law says force equals mass times acceleration, and acceleration is a second derivative, which is precisely why second-order equations own the physical world: springs, pendulums, circuits, suspension systems, anything that pushes back and coasts.
The big picture
Why does the order jump from one to two change the story? A first-order equation needed one integration to undo, hence one constant, hence one initial fact. A second-order equation hides two integrations, so its general solution carries two arbitrary constants, and an initial value problem must supply two facts, a starting position y(0) and a starting velocity y'(0). Lesson 1 previewed this; now it becomes the organizing principle of everything we build.
This lesson establishes the architecture in three pieces: the superposition principle, which lets solutions be combined; linear independence, which tells us when two solutions are genuinely different; and the characteristic equation, the translation device that converts the whole differential equation into a quadratic from algebra class. The next lesson then simply reads the quadratic's roots and writes the answers.
Key idea: solving a second-order homogeneous linear equation means finding two independent building-block solutions and taking all combinations of them.
Why two solutions, combined
A second-order linear homogeneous equation has a beautiful structure. If y_1 and y_2 are both solutions, then so is every combination C_1 y_1 + C_2 y_2. This is the superposition principle, and it holds precisely because the equation is linear and homogeneous. To capture all solutions we need two building-block solutions that are genuinely different, not multiples of each other.
Superposition is checkable with bare hands, and the check shows exactly where it comes from. Substitute y = C_1 y_1 + C_2 y_2 into the left side. Derivatives pass through sums and constants, so y' = C_1 y_1' + C_2 y_2' and y'' = C_1 y_1'' + C_2 y_2''. Then
a y'' + b y' + c y = C_1 (a y_1'' + b y_1' + c y_1) + C_2 (a y_2'' + b y_2' + c y_2).
Each parenthesis is the equation applied to a known solution, so each equals zero, and the whole expression is C_1 * 0 + C_2 * 0 = 0. Notice where homogeneity earned its keep: if the right side were a nonzero g(x), each parenthesis would equal g(x) and the combination would produce (C_1 + C_2) g(x), which is generally not g(x). Sums of solutions of a driven equation are not solutions; sums of solutions of the undriven equation always are.
Two functions are linearly independent if neither is a constant multiple of the other. For instance e^x and e^(2x) are independent, but e^x and 3 e^x are not. The general solution of a second-order homogeneous equation is
y = C_1 y_1 + C_2 y_2
where y_1 and y_2 are any two linearly independent solutions. Two arbitrary constants is exactly right for a second-order equation, and they are the two facts an initial value problem supplies, usually y(0) and y'(0).
Why does independence matter so much? Try building the general solution from dependent pieces. With y_1 = e^x and y_2 = 3 e^x, the combination C_1 e^x + 3 C_2 e^x = (C_1 + 3 C_2) e^x collapses into a single constant times e^x. Two dials on the outside, one dial of actual freedom.
Such a family can match a starting value or a starting slope, but usually not both at once. Independent pieces keep the two dials genuinely separate, which is what lets the family meet any pair of initial conditions. A quick test: divide one function by the other; if the ratio is not a constant, the pair is independent.
Key idea: homogeneity makes combinations work, and independence makes the two constants real. Together they say the full solution set is exactly C_1 y_1 + C_2 y_2.
A concrete rehearsal
Consider y'' - y = 0, which asks for functions equal to their own second derivative. Two candidates volunteer: y_1 = e^x, whose every derivative is itself, and y_2 = e^(-x), whose second derivative restores the lost sign since (e^(-x))'' = (-e^(-x))' = e^(-x). Both check. Their ratio e^x / e^(-x) = e^(2x) is not constant, so they are independent, and the general solution is y = C_1 e^x + C_2 e^(-x).
Now watch the two constants meet two conditions. Impose y(0) = 7 and y'(0) = -3. The value condition: C_1 + C_2 = 7. Differentiate the family, y' = C_1 e^x - C_2 e^(-x), and the slope condition gives C_1 - C_2 = -3. Add the two equations: 2 C_1 = 4, so C_1 = 2, and then C_2 = 5. The particular solution is y = 2 e^x + 5 e^(-x), one curve chosen from a two-parameter family by two facts. This tiny system-of-equations finish is the standard final step of every second-order IVP in the module.
The characteristic equation
How do we find y_1 and y_2? Guess that a solution has the form y = e^(r x) for some number r. Then y' = r e^(r x) and y'' = r^2 e^(r x). Substitute into a y'' + b y' + c y = 0:
a r^2 e^(r x) + b r e^(r x) + c e^(r x) = 0.
Since e^(r x) is never zero, divide it out to leave a plain quadratic in r, the characteristic equation:
a r^2 + b r + c = 0.
The exponents in the solution are just the roots of this quadratic. Everything now depends on what kind of roots the quadratic has, which the discriminant b^2 - 4ac decides. The next lesson works through all three cases. This translation, from a differential equation to an ordinary quadratic, is the central trick of the whole module.
The guess is not a lucky stab; it is aimed. The equation demands that a weighted blend of y, y', and y'' cancel to zero for every x. That is only plausible if the three ingredients have the same shape, and exponentials are the functions whose derivatives are multiples of themselves. Differentiating e^(r x) changes its size by a factor r but never its form, so each term of the equation becomes a number times the same e^(r x), and the cancellation question becomes a question about numbers. That question is the quadratic.
Rehearse the translation once. For y'' - y = 0: here a = 1, b = 0, c = -1, so the characteristic equation is r^2 - 1 = 0, with roots r = 1 and r = -1. The corresponding solutions are e^x and e^(-x), exactly the pair we verified by hand above. The machinery agrees with the bare-hands work, which is the best kind of reassurance a method can offer.
Key idea: the exponential guess converts calculus into algebra: each root r of a r^2 + b r + c = 0 supplies one solution e^(r x).
Where people get stuck
Superposing driven solutions. The combination rule needs g(x) = 0. Adding two solutions of y'' + y = cos(x) gives a function answering to 2 cos(x), not cos(x). Module 5 handles driven equations with a different decomposition.
Mistaking different-looking for independent. The pair e^x and 3 e^x wear different coefficients but are multiples, hence dependent. Run the ratio test rather than trusting appearances.
Writing the characteristic equation with derivatives in it. The characteristic equation is pure algebra: y'' becomes r^2, y' becomes r, and y becomes 1. An expression like r^2 y + r y = 0 mixes the two worlds and stalls the method.
Losing a sign in the translation. For y'' - y = 0 the constant term is c = -1, giving r^2 - 1 = 0. Copy each coefficient with its sign attached, the same discipline standard form demanded in Module 2.
Using the exponential guess where it does not belong. The trick relies on constant coefficients. An equation like y'' + x y = 0 feeds the guess an x that cannot cancel, and other methods, beyond this course, take over.
Try it
For y'' + y' - 2y = 0: write the characteristic equation, find the roots, give the general solution, and then solve the IVP with y(0) = 0, y'(0) = 3.
Worked answer. The translation gives r^2 + r - 2 = 0, which factors as (r + 2)(r - 1) = 0, so the roots are r = 1 and r = -2. Two independent solutions are e^x and e^(-2x) (their ratio e^(3x) is not constant), so the general solution is y = C_1 e^x + C_2 e^(-2x).
Now the two facts. Value: y(0) = C_1 + C_2 = 0. Differentiate: y' = C_1 e^x - 2 C_2 e^(-2x), so the slope condition is C_1 - 2 C_2 = 3. Subtract the first equation from the second: -3 C_2 = 3, so C_2 = -1 and C_1 = 1. The particular solution is y = e^x - e^(-2x). Check the starting data: y(0) = 1 - 1 = 0 and y'(0) = 1 + 2 = 3. Both facts land, and the structure of the whole module just ran start to finish in four lines.
Recap
Second-order linear equations describe systems with inertia, and their homogeneous case has a clean architecture. Superposition says combinations of solutions are solutions, a fact you can verify by substituting and watching each parenthesis vanish; it fails the moment a driving term appears. Linear independence, testable by a non-constant ratio, guarantees the two constants in C_1 y_1 + C_2 y_2 are genuinely two, which is what lets the family meet any starting position and velocity.
The characteristic equation a r^2 + b r + c = 0 comes from the aimed guess y = e^(r x), whose derivatives keep its shape and turn the calculus problem into a quadratic. Each root furnishes an exponential solution. What remains is an inventory of what quadratics can do: two distinct real roots, one repeated root, or a complex pair. That inventory, and the solution formula for each case, is the whole of the next lesson.
Sources
- Lebl, J. (n.d.). Second-order linear ODEs. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Dawkins, P. (n.d.). Basic Concepts for Second Order Differential Equations. Paul's Online Math Notes, Lamar University. tutorial.math.lamar.edu
- Khan Academy. (n.d.). Second order linear equations. khanacademy.org
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- Mattuck, A., Miller, H., Orloff, J., & Lewis, J. (2010). 18.03 Differential equations [Course materials]. MIT OpenCourseWare. ocw.mit.edu
- O'Connor, J. J., & Robertson, E. F. (n.d.). Leonhard Euler. MacTutor History of Mathematics Archive, University of St Andrews. mathshistory.st-andrews.ac.uk
- Key terms
- Second-order linear equation
- An equation of the form a y'' + b y' + c y = g(x) with the unknown to the first power.
- Homogeneous equation
- A linear equation with no driving term, g(x) = 0.
- Superposition principle
- Any linear combination of solutions of a linear homogeneous equation is again a solution.
- Linearly independent
- Two functions where neither is a constant multiple of the other.
- Characteristic equation
- The quadratic a r^2 + b r + c = 0 whose roots give the exponents of the solutions.
The Three Cases: Real, Repeated, and Complex Roots
- Solve a homogeneous equation when the characteristic roots are real and distinct.
- Handle the repeated-root case with the extra factor of x.
- Write oscillating solutions when the roots are complex.
The general solution of a y'' + b y' + c y = 0 is decided entirely by the roots of its characteristic equation a r^2 + b r + c = 0. The discriminant b^2 - 4ac sorts every problem into one of three cases.
The big picture
Last lesson built the machine: guess e^(r x), land on a quadratic, read off the exponents. What remains is an inventory, because quadratics can only do three things. They can have two different real roots, one doubled real root, or a pair of complex roots that are mirror images of each other. Each possibility stamps a completely different personality on the solutions: blends of plain exponentials in the first case, an exponential with a linear escort in the second, and oscillations wrapped in an exponential envelope in the third.
The three cases are not equally sized bins of homework problems; they are three kinds of physical behavior. When springs arrive in Module 5, the same discriminant will decide whether a pushed door slams back and forth, closes as fast as possible, or oozes shut. Learning to move from discriminant to root type to solution shape, without hesitation, is the entire skill of this lesson.
Key idea: compute b^2 - 4ac first. Its sign chooses the case, and each case has one fixed solution template.
Case 1, two distinct real roots
If b^2 - 4ac > 0, the quadratic has two different real roots r_1 and r_2. Each gives an independent exponential solution, so
y = C_1 e^(r_1 x) + C_2 e^(r_2 x).
Worked example. Solve y'' - 5y' + 6y = 0. The characteristic equation r^2 - 5r + 6 = 0 factors as (r - 2)(r - 3) = 0, so r = 2, 3. The general solution is y = C_1 e^(2x) + C_2 e^(3x).
Finish the example as an IVP to see the constants earn their pay. Impose y(0) = 1 and y'(0) = 0. The value condition gives C_1 + C_2 = 1. Differentiating, y' = 2 C_1 e^(2x) + 3 C_2 e^(3x), so the slope condition gives 2 C_1 + 3 C_2 = 0. Substituting C_1 = 1 - C_2 into the second equation: 2 - 2 C_2 + 3 C_2 = 0, so C_2 = -2 and C_1 = 3. The particular solution is y = 3 e^(2x) - 2 e^(3x).
Read the long-run story from the roots: for large x, the e^(3x) term dwarfs the e^(2x) term, so the solution eventually follows the largest root, here plunging negative because its coefficient is -2. With two real roots, the bigger one always wins the long run, and negative roots mean decay toward zero. You can sketch the fate of any Case 1 solution before plotting a single point.
Case 2, one repeated real root
If b^2 - 4ac = 0, the quadratic has a single repeated root r = -b/(2a). That gives only one exponential, but a second-order equation needs two independent solutions. The missing partner is the same exponential multiplied by x. So
y = C_1 e^(r x) + C_2 x e^(r x).
Worked example. Solve y'' - 6y' + 9y = 0. Here r^2 - 6r + 9 = (r - 3)^2 = 0, a repeated root r = 3. The general solution is y = C_1 e^(3x) + C_2 x e^(3x). You can verify x e^(3x) is a genuine second solution by substitution.
Run that verification in full, because the claim deserves proof. Let y = x e^(3x). Product rule: y' = e^(3x) + 3x e^(3x) = e^(3x)(1 + 3x). Again: y'' = 3 e^(3x)(1 + 3x) + e^(3x)(3) = e^(3x)(6 + 9x). Substitute into the left side and factor out e^(3x): the bracket is (6 + 9x) - 6(1 + 3x) + 9x = 6 + 9x - 6 - 18x + 9x = 0. Zero for every x, so x e^(3x) checks, and it is visibly not a constant multiple of e^(3x), so the pair is independent.
Where does the extra x come from? Picture Case 1 with two roots sliding toward each other: r and r + h with h small. Both e^(r x) and e^((r+h) x) solve their equation, and so does the combination (e^((r+h) x) - e^(r x))/h, by superposition. As h shrinks to zero, that expression is exactly the definition of the derivative of e^(r x) with respect to r, and that derivative is x e^(r x). The second solution is the ghost the merging roots leave behind: the direction the two exponentials were separating in, the instant before they collided.
Key idea: a repeated root supplies e^(r x) and x e^(r x). The x factor is the surviving trace of two roots that merged.
Case 3, complex conjugate roots
If b^2 - 4ac < 0, the roots are a complex conjugate pair r = alpha +/- beta i, where alpha = -b/(2a) and beta = sqrt(4ac - b^2)/(2a). Using Euler's formula to convert the complex exponentials into real trig functions, the real general solution is
y = e^(alpha x) [C_1 cos(beta x) + C_2 sin(beta x)].
The real part alpha controls growth or decay of the envelope, and beta is the frequency of oscillation. This is the case that produces vibrations and waves.
The bridge from complex roots to real cosines is worth crossing once slowly. Euler's formula says e^(i theta) = cos(theta) + i sin(theta): an imaginary exponent does not mean explosive growth, it means rotation. So the root alpha + beta i produces e^((alpha + beta i) x) = e^(alpha x) e^(i beta x) = e^(alpha x)[cos(beta x) + i sin(beta x)], a spiral: steady rotation at rate beta, with size controlled by e^(alpha x).
Averaging this solution with its conjugate partner isolates the cosine; subtracting and dividing by 2i isolates the sine. Superposition permits both maneuvers, and the two real solutions e^(alpha x) cos(beta x) and e^(alpha x) sin(beta x) emerge.
Worked example. Solve y'' + 4y = 0. The characteristic equation r^2 + 4 = 0 gives r = +/- 2i, so alpha = 0 and beta = 2. The general solution is y = C_1 cos(2x) + C_2 sin(2x), pure oscillation with no decay.
Worked example with decay. Solve y'' + 2y' + 5y = 0. The characteristic equation r^2 + 2r + 5 = 0 has discriminant 4 - 20 = -16 < 0, and roots r = (-2 +/- sqrt(-16))/2 = -1 +/- 2i. So alpha = -1, beta = 2, and y = e^(-x)[C_1 cos(2x) + C_2 sin(2x)], a decaying oscillation.
Interpret the two numbers physically. The oscillation repeats every 2 pi / beta = pi units, regardless of alpha. Meanwhile the amplitude shrinks by the factor e^(-1) approximately 0.37 every unit of x. A struck bell rings at its own pitch (beta) while fading at its own rate (alpha), and the two numbers never interfere with each other's jobs.
| Discriminant | Roots | General solution |
| b^2 - 4ac > 0 | real, distinct r1, r2 | C1 e^(r1 x) + C2 e^(r2 x) |
| b^2 - 4ac = 0 | repeated r | C1 e^(r x) + C2 x e^(r x) |
| b^2 - 4ac < 0 | alpha +/- beta i | e^(alpha x)[C1 cos(beta x) + C2 sin(beta x)] |
The table is the whole lesson compressed. In practice the workflow is always: write the characteristic equation, compute the discriminant, pick the row, fill in the template. When the quadratic factors easily, factor; when it does not, the quadratic formula produces the roots, and a negative number under the square root is not a dead end but a signpost to row three.
Where people get stuck
Carrying the i into the formula. In row three, beta is the number multiplying i, not the expression beta i. For roots -1 +/- 2i, write cos(2x), never cos(2ix). The imaginary unit was spent building the sine and cosine; it does not appear in the answer.
Quitting on a negative discriminant. A negative b^2 - 4ac does not mean no solution; it means oscillation. The equation has exactly as many solutions as before, now trigonometric in form.
Misplacing the x factor. The extra x belongs to the repeated-root case only. Writing C_1 e^(2x) + C_2 x e^(3x) for distinct roots 2 and 3 fails substitution; writing C_1 e^(3x) + C_2 e^(3x) for a repeated root collapses to one constant and cannot meet two initial conditions.
Sign slips in the quadratic formula. The formula is r = (-b +/- sqrt(b^2 - 4ac))/(2a), with a leading minus on b. For r^2 + 2r + 5, that leading minus produced alpha = -1; dropping it flips decay into growth, which the physics of the problem will usually contradict loudly.
Halving errors. Both alpha and beta inherit the division by 2a. Compute them together from the formula rather than eyeballing the coefficients.
Try it
Solve all three, naming the case first: (a) y'' - 4y = 0, (b) y'' + 4y' + 4y = 0, (c) y'' - 2y' + 10y = 0.
Worked answers. (a) Characteristic equation r^2 - 4 = 0, discriminant 0 - 4(1)(-4) = 16 > 0: Case 1. Roots r = +/- 2, so y = C_1 e^(2x) + C_2 e^(-2x), one growing strand and one decaying strand. (b) r^2 + 4r + 4 = (r + 2)^2 = 0, discriminant 16 - 16 = 0: Case 2, repeated root r = -2. So y = C_1 e^(-2x) + C_2 x e^(-2x), decay with a linear escort.
(c) r^2 - 2r + 10 = 0, discriminant 4 - 40 = -36 < 0: Case 3. Roots r = (2 +/- sqrt(-36))/2 = 1 +/- 3i, so alpha = 1, beta = 3, and y = e^x[C_1 cos(3x) + C_2 sin(3x)], an oscillation whose envelope grows. If you named each case from the discriminant before touching a template, the lesson has done its work.
Recap
Everything flows from the discriminant of the characteristic equation. Positive: two real exponentials, with the largest root ruling the long run. Zero: one exponential and its x-escorted partner, the trace left by merging roots, verified honestly by substitution. Negative: Euler's formula converts the conjugate pair alpha +/- beta i into e^(alpha x) times cosines and sines, with alpha as the envelope's growth or decay rate and beta as the frequency.
The templates never mix and never change, so fluency is a matter of sorting quickly and copying carefully, then finishing IVPs with the two-equation constant hunt from last lesson. Next, Module 5 restores the driving term g(x), where these homogeneous solutions become one half of every answer, and the discriminant's three personalities become the three ways a real spring can settle.
Sources
- Lebl, J. (n.d.). Constant-coefficient second-order linear ODEs. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Dawkins, P. (n.d.). Real Roots. Paul's Online Math Notes, Lamar University. tutorial.math.lamar.edu
- Khan Academy. (n.d.). Second order linear equations. khanacademy.org
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- Mattuck, A., Miller, H., Orloff, J., & Lewis, J. (2010). 18.03 Differential equations [Course materials]. MIT OpenCourseWare. ocw.mit.edu
- O'Connor, J. J., & Robertson, E. F. (n.d.). Leonhard Euler. MacTutor History of Mathematics Archive, University of St Andrews. mathshistory.st-andrews.ac.uk
- Key terms
- Discriminant
- The quantity b^2 - 4ac that decides which of the three solution cases applies.
- Distinct real roots
- Two different real solutions r1, r2 giving exponentials e^(r1 x) and e^(r2 x).
- Repeated root
- A single root r whose second independent solution is x e^(r x).
- Complex conjugate roots
- A pair alpha +/- beta i producing e^(alpha x)[cos(beta x), sin(beta x)] solutions.
- Euler's formula
- e^(i theta) = cos(theta) + i sin(theta), used to turn complex exponentials into real trig functions.
Module 5: Nonhomogeneous Equations and Applications
Add a driving term with undetermined coefficients, then apply second-order equations to springs and circuits.
Undetermined Coefficients
- Write the general solution as the homogeneous solution plus a particular solution.
- Choose a trial form for the particular solution based on the driving term.
- Solve for the coefficients and assemble the full solution.
Now restore the driving term: a y'' + b y' + c y = g(x) with g(x) not zero. The key structural fact is that the general solution splits into two parts:
y = y_h + y_p
where y_h is the homogeneous solution (the general solution of the equation with g = 0, from Module 4) and y_p is any single particular solution of the full equation. The homogeneous part carries the two arbitrary constants; the particular part answers the forcing.
The big picture
Physically, g(x) is an outside influence leaning on the system: a motor shaking a spring, a voltage source pushing a circuit. The response naturally divides into two stories. The system has its own private behavior, the y_h from Module 4, which would happen with no outside push at all. Layered on top is one specific accommodation to the push, the y_p. Solving a driven equation means telling both stories and adding them.
Why is the sum the whole truth? Suppose y is any solution of the full equation, and y_p is the one we found. Substitute their difference into the left side: derivatives pass through subtraction, so the left side applied to y - y_p equals g(x) - g(x) = 0. The difference solves the homogeneous equation, so it must be one of the y_h family. Read backward: every solution is y_p plus some homogeneous solution. Nothing is missing, and nothing extra sneaks in.
Key idea: find the homogeneous family once, find any single particular solution by any honest means, and the sum is the complete general solution.
The method of undetermined coefficients
When g(x) is a polynomial, an exponential, a sine or cosine, or a product of these, we can guess the form of y_p with unknown coefficients, then solve for them. The trial form mirrors the driving term:
| Driving term g(x) | Trial y_p |
| polynomial, e.g. 3x + 2 | A x + B (same degree, all terms) |
| exponential, e.g. e^(2x) | A e^(2x) |
| sine or cosine, e.g. cos(3x) | A cos(3x) + B sin(3x) |
| product, e.g. x e^x | (A x + B) e^x |
The table is not arbitrary; it lists the families that differentiation cannot escape. Differentiate a polynomial and you get a polynomial; differentiate e^(2x) and you get a multiple of e^(2x); differentiate sines and cosines of 3x and you shuffle between sines and cosines of 3x. Because the left side of the equation only differentiates and adds, a trial from the right family produces output in that same family, and matching coefficients becomes possible. A function like tan(x) or ln(x) spawns endless new shapes under differentiation, so this method declines those; a technique called variation of parameters handles them in later courses.
Two details in the table deserve emphasis. A polynomial trial needs every degree from the top down to the constant, even if g is missing some: differentiation lowers degrees, and the lower terms are needed to absorb the debris. And a cosine forcing needs both A cos + B sin, because differentiating cosine manufactures sine; a lone cosine guess has no way to cancel it.
Key idea: guess the driving term's whole family, coefficients unknown. Substitution then turns calculus into a small system of linear equations.
Worked example, exponential forcing
Solve y'' - 5y' + 6y = e^x.
- Homogeneous part: from Module 4,
y_h = C_1 e^(2x) + C_2 e^(3x). - Trial:
g = e^x, so guessy_p = A e^x. Theny_p' = A e^xandy_p'' = A e^x. - Substitute:
A e^x - 5 A e^x + 6 A e^x = e^x, so(1 - 5 + 6) A e^x = 2 A e^x = e^x. - Solve:
2A = 1, soA = 1/2andy_p = (1/2) e^x.
The full solution is y = C_1 e^(2x) + C_2 e^(3x) + (1/2) e^x.
Notice what the number 2 in step 3 really is: it is the characteristic polynomial r^2 - 5r + 6 evaluated at the forcing exponent r = 1, since 1 - 5 + 6 = 2. That is no coincidence. Substituting A e^(k x) always produces (characteristic polynomial at k) times A e^(k x), so the coefficient is A = 1/p(k) whenever p(k) is not zero. It also flags the danger ahead: if k happens to be a root of the characteristic equation, p(k) = 0, the division fails, and the trial needs repair. That repair is the next example.
Worked example, trig forcing
Solve y'' + y = 4 cos(x)... but first a warning. The homogeneous solution is y_h = C_1 cos(x) + C_2 sin(x), which already contains cos(x). When the trial form duplicates a homogeneous solution, multiply the trial by x. So use y_p = x (A cos x + B sin x).
Why the failure, in plain terms: the homogeneous solutions are exactly the inputs the left side crushes to zero. Feeding the machine A cos x returns zero, and zero can never equal 4 cos(x). The x factor creates a function the machine does not annihilate, the same medicine the repeated-root case took in Module 4, and for the same underlying reason.
Now the computation, every derivative shown. With y_p = x(A cos x + B sin x), the product rule gives y_p' = (A cos x + B sin x) + x(-A sin x + B cos x). Differentiate again, watching each piece: the first parenthesis contributes -A sin x + B cos x, and the product term contributes (-A sin x + B cos x) + x(-A cos x - B sin x). Altogether y_p'' = 2(-A sin x + B cos x) - x(A cos x + B sin x).
Substitute into y'' + y: the x(A cos x + B sin x) pieces cancel exactly (that is the annihilation happening before your eyes), leaving y_p'' + y_p = -2A sin x + 2B cos x.
Match against 4 cos x: the sine coefficients give -2A = 0, so A = 0; the cosine coefficients give 2B = 4, so B = 2. Thus y_p = 2x sin(x) and y = C_1 cos x + C_2 sin x + 2x sin x. This growing term is resonance, which we meet again with springs: pushing a system at exactly its own frequency produces a response whose amplitude climbs without bound.
Key idea: always compute y_h before choosing the trial. If the trial overlaps y_h, multiply by x (and by x^2 in the doubly-overlapping repeated-root case).
A cleaner trig example
Solve y'' - 5y' + 6y = 3 cos(x). No overlap with y_h = C_1 e^(2x) + C_2 e^(3x), since exponentials and cosines share no members, so the standard trial stands: y_p = A cos x + B sin x.
- Derivatives:
y_p' = -A sin x + B cos xandy_p'' = -A cos x - B sin x. - Substitute:
(-A cos x - B sin x) - 5(-A sin x + B cos x) + 6(A cos x + B sin x). - Group the cosine terms:
-A - 5B + 6A = 5A - 5B. Group the sine terms:-B + 5A + 6B = 5A + 5B. - Match against
3 cos x + 0 sin x: the system is5A - 5B = 3and5A + 5B = 0. - Add the equations:
10A = 3, soA = 3/10. The second equation saysB = -A, soB = -3/10.
Thus y_p = (3/10) cos x - (3/10) sin x, and the full solution is y = C_1 e^(2x) + C_2 e^(3x) + (3/10) cos x - (3/10) sin x. The sine term in the answer, despite a pure cosine forcing, is the y' term's doing: the odd derivative converts some cosine into sine, and the trial's B is there to absorb it.
Worked example, polynomial forcing
Solve y'' - y' - 2y = 4x^2. The characteristic equation r^2 - r - 2 = (r - 2)(r + 1) = 0 gives y_h = C_1 e^(2x) + C_2 e^(-x); no polynomial hides there, so no overlap.
- Trial, same degree and all terms below it:
y_p = A x^2 + B x + C. Theny_p' = 2Ax + Bandy_p'' = 2A. - Substitute:
2A - (2Ax + B) - 2(Ax^2 + Bx + C) = -2A x^2 + (-2A - 2B) x + (2A - B - 2C). - Match degree by degree against
4x^2 + 0x + 0: fromx^2,-2A = 4, soA = -2. Fromx,-2A - 2B = 0, soB = -A = 2. From constants,2A - B - 2C = 0, so-4 - 2 - 2C = 0andC = -3.
So y_p = -2x^2 + 2x - 3 and y = C_1 e^(2x) + C_2 e^(-x) - 2x^2 + 2x - 3. Check the particular part: y_p'' = -4, y_p' = -4x + 2, and -4 - (-4x + 2) - 2(-2x^2 + 2x - 3) = 4x^2. It balances. Had we lazily tried y_p = A x^2 alone, the x and constant debris would have had nowhere to go and the match would have failed; the full-degree trial is what makes the bookkeeping close.
Where people get stuck
Skipping the homogeneous solution. The overlap check requires knowing y_h first. Solve the characteristic equation before writing any trial, every time, even when the forcing looks innocent.
Trimming the trial. Cosine forcing needs the sine partner; degree-two forcing needs x and constant terms. The trial is the whole family, not the single function printed in g.
Attaching constants to the wrong part. The arbitrary C_1, C_2 live in y_h. The coefficients in y_p are specific numbers the algebra determines; leaving them as free constants doubles the family and fails the check.
Applying initial conditions too early. Conditions apply to the full y = y_h + y_p, after y_p is known. Fitting C_1, C_2 to y_h alone, then adding y_p, shifts the starting values and misses both conditions.
Forgetting the x-repair, or overusing it. Multiply by x exactly when the trial duplicates a homogeneous term, once per level of duplication. No overlap, no x.
Try it
Solve the IVP y'' + 4y = 8x, y(0) = 0, y'(0) = 6.
Worked answer. Homogeneous part: r^2 + 4 = 0 gives r = +/- 2i, so y_h = C_1 cos(2x) + C_2 sin(2x). The forcing 8x is a degree-one polynomial and no polynomial lives in y_h, so try y_p = A x + B. Then y_p'' = 0, and substituting gives 0 + 4(Ax + B) = 8x, so 4A = 8 and 4B = 0: A = 2, B = 0, and y_p = 2x. General solution: y = C_1 cos(2x) + C_2 sin(2x) + 2x.
Now the conditions, applied to the full solution. Value: y(0) = C_1 + 0 + 0 = 0, so C_1 = 0. Slope: y' = -2 C_1 sin(2x) + 2 C_2 cos(2x) + 2, so y'(0) = 2 C_2 + 2 = 6 and C_2 = 2. The answer is y = 2 sin(2x) + 2x. Check it end to end: y'' = -8 sin(2x), and y'' + 4y = -8 sin(2x) + 8 sin(2x) + 8x = 8x, with y(0) = 0 and y'(0) = 4 + 2 = 6. Everything lands.
Recap
Driven linear equations split as y = y_h + y_p: the system's own behavior plus one accommodation to the forcing, and the difference argument shows this sum captures every solution. Undetermined coefficients finds y_p by guessing the forcing's differentiation-closed family, polynomials with all their degrees, exponentials, sine-cosine pairs, then matching coefficients term by term, which collapses calculus into a small linear system.
The one hazard is overlap: when the forcing already lives in y_h, the left side annihilates the naive trial, and a factor of x rescues it, producing the growing resonance terms that Module 5's spring lesson will make physical. Order of operations is everything: characteristic equation, homogeneous family, overlap check, trial, match, and only then initial conditions on the assembled whole.
Sources
- Lebl, J. (n.d.). Nonhomogeneous equations. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Dawkins, P. (n.d.). Undetermined Coefficients. Paul's Online Math Notes, Lamar University. tutorial.math.lamar.edu
- Khan Academy. (n.d.). Second order linear equations. khanacademy.org
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- Mattuck, A., Miller, H., Orloff, J., & Lewis, J. (2010). 18.03 Differential equations [Course materials]. MIT OpenCourseWare. ocw.mit.edu
- Key terms
- Homogeneous solution
- The part y_h solving the equation with the driving term removed; carries the arbitrary constants.
- Particular solution
- Any single solution y_p of the full nonhomogeneous equation.
- Undetermined coefficients
- A method that guesses y_p's form from g(x) and solves for its unknown constants.
- Trial form
- The candidate expression for y_p, chosen to match the driving term.
- Resonance
- When the trial overlaps the homogeneous solution, forcing an extra factor of x and unbounded growth.
Mechanical Vibrations and Electrical Circuits
- Model a spring-mass system as a second-order equation and classify its damping.
- Model a series RLC circuit with the same equation form.
- Interpret free, damped, and driven behavior physically.
The reason second-order linear equations matter so much is that one equation describes both a bouncing spring and an electrical circuit. Learning the mechanics teaches the circuit for free.
The big picture
This is the payoff lesson for Modules 4 and 5. The characteristic equation, the three root cases, and the resonance repair were all abstract machinery; here each piece acquires a physical face. The discriminant becomes a design question about shock absorbers. The complex case becomes a ringing bell. The repeated root becomes a well-tuned door closer. And the resonance term from last lesson becomes the reason bridges have speed limits for marching formations.
The plan: derive the spring equation from Newton's second law so every term has a physical name, solve the free cases with Module 4's templates, sort damping by the discriminant, revisit resonance with forcing, and then discover the identical mathematics running through an electrical circuit. One solution manual, two sciences.
Key idea: position, velocity, acceleration in mechanics translate to charge, current, and rate of change of current in circuits. The differential equation cannot tell the difference.
The spring-mass system
A mass m on a spring with stiffness k, with a damping (friction) force proportional to velocity with constant c, and an external force F(t), obeys Newton's second law:
m x'' + c x' + k x = F(t)
Here x(t) is displacement from equilibrium. Each term is a force: m x'' is inertia, c x' is damping, and k x is the spring's restoring pull (Hooke's law). This is exactly the constant-coefficient form of Module 4, so the characteristic-equation method applies directly.
The derivation is worth one careful pass. Newton says mass times acceleration equals the sum of forces: m x'' = -k x - c x' + F(t). The spring force is -k x because it always points back toward equilibrium: stretch the spring (x > 0) and it pulls negative; compress it and it pushes positive. The damping force is -c x' because friction opposes whatever direction the mass currently moves. Move every internal force to the left side and the standard form appears, with only the external push remaining on the right. The signs are the physics; get them from the story, not from memory.
Free undamped motion
With no damping and no forcing (c = 0, F = 0), m x'' + k x = 0 gives roots r = +/- i sqrt(k/m), so
x(t) = C_1 cos(omega_0 t) + C_2 sin(omega_0 t), with natural frequency omega_0 = sqrt(k/m).
The mass oscillates forever at its natural frequency. Worked example: m = 1, k = 16 gives omega_0 = sqrt(16) = 4, so x = C_1 cos(4t) + C_2 sin(4t).
Finish that example with data. Pull the mass 0.1 meters down and release it from rest: x(0) = 0.1, x'(0) = 0. The value condition gives C_1 = 0.1; differentiating and evaluating gives 4 C_2 = 0, so C_2 = 0, and x = 0.1 cos(4t). The motion repeats every 2 pi / 4 approximately 1.57 seconds, swinging between 0.1 and -0.1 forever. The formula for omega_0 reads like physics: stiffer spring (bigger k), faster vibration; heavier mass (bigger m), slower vibration, both under a square root, so quadrupling the mass only halves the frequency.
A useful repackaging: any combination C_1 cos(omega_0 t) + C_2 sin(omega_0 t) equals R cos(omega_0 t - phi), a single cosine with amplitude R = sqrt(C_1^2 + C_2^2) and a phase shift phi. The two constants secretly encode one loudness and one timing offset. Engineers report R because it answers the practical question: how far does it swing?
Key idea: free undamped motion is pure Case 3 with alpha = 0: a cosine wave at omega_0 = sqrt(k/m) whose amplitude never changes.
Damping, three regimes
Turning on damping (c > 0) determines behavior through the discriminant c^2 - 4mk:
- Underdamped (
c^2 < 4mk): complex roots, so the mass oscillates with an amplitude that decays likee^(-(c/2m) t). A struck tuning fork. - Critically damped (
c^2 = 4mk): a repeated root, the fastest return to rest with no oscillation. A well-designed door closer. - Overdamped (
c^2 > 4mk): two negative real roots, a slow sluggish return to rest. Moving through thick oil.
Worked example. x'' + 2x' + 5x = 0 models m = 1, c = 2, k = 5. The discriminant is 4 - 20 = -16 < 0, underdamped, with roots -1 +/- 2i, so x = e^(-t)[C_1 cos(2t) + C_2 sin(2t)]: oscillation shrinking under an e^(-t) envelope.
Two companion examples complete the tour. Critical: x'' + 4x' + 4x = 0 has (r + 2)^2 = 0, so x = (C_1 + C_2 t) e^(-2t), gliding to rest with at most one gentle overshoot; this is the tuning a door closer aims for. Overdamped: x'' + 5x' + 4x = 0 has roots -1 and -4, so x = C_1 e^(-t) + C_2 e^(-4t). Note the long run is governed by the slower root -1: past critical, extra damping actually delays the settling, which is why more damping is not always better engineering.
One subtlety of the underdamped case: the ringing frequency is beta = sqrt(4mk - c^2)/(2m), slightly below the natural omega_0. Friction both shrinks the swings and slows the beat, a detail piano tuners and suspension designers each must respect.
Resonance
If an undamped system is driven at its natural frequency, the particular solution grows without bound (the x-times factor from the last lesson). This is resonance, the reason soldiers break step on bridges and a pushed swing climbs higher with each well-timed push.
Last lesson's machinery makes this quantitative. Drive the system as x'' + omega_0^2 x = F_0 cos(omega_0 t): the forcing frequency sits exactly on the homogeneous solutions, the naive trial is annihilated, and the repaired trial delivers x_p = (F_0 / (2 omega_0)) t sin(omega_0 t). Read the formula like a sentence: the response oscillates at the driving frequency, but its amplitude is (F_0 / (2 omega_0)) t, a straight line through time. Every cycle, the push arrives precisely when the swing is ready to receive it, and the energy deposits accumulate without limit.
Real systems always carry some damping, which caps the growth at a large but finite amplitude; the closer the driving frequency is to natural and the smaller the damping, the taller the cap. That is why resonance is a design constraint, not a curiosity: machinery, buildings, and circuits are all tuned either to avoid their natural frequencies or to exploit them deliberately.
Key idea: matching the natural frequency converts small periodic pushes into large accumulated swings. Damping is the only brake.
The RLC circuit, same equation
A series circuit with inductance L, resistance R, and capacitance C, driven by a voltage E(t), satisfies, for the charge q(t) on the capacitor,
L q'' + R q' + (1/C) q = E(t).
Compare term by term: inductance L plays the role of mass (inertia of current), resistance R plays the role of damping, and 1/C plays the role of spring stiffness. An underdamped circuit rings; an overdamped one settles quietly. One mathematical solution, two physical worlds.
The equation is Kirchhoff's voltage law in disguise: around the loop, the three voltage drops sum to the source. The inductor resists changes in current, dropping L times the derivative of current; since current is i = q', that term is L q''. The resistor drops R i = R q'. The capacitor drops q/C. Add them, set equal to E(t), and the spring equation reappears letter for letter.
Worked example. Take L = 1 henry, R = 2 ohms, C = 0.2 farads, no source. Then 1/C = 5 and the equation is q'' + 2q' + 5q = 0, precisely the underdamped worked example above. The charge rings at frequency 2 while dying under an e^(-t) envelope: this is the ringing you can measure on an oscilloscope after switching such a circuit off, and the mathematics was already solved before the circuit was mentioned.
Where people get stuck
Writing the spring force with the wrong sign. The restoring term enters the standard form as + k x on the left, which came from -k x as a force. Rebuild the sign from the story (stretch pulls back) rather than guessing.
Confusing omega with frequency in hertz. omega_0 = sqrt(k/m) is measured in radians per second; cycles per second is f = omega_0 / (2 pi). A factor of 2 pi approximately 6.28 separates the two conventions, and mixing them wrecks every numeric answer.
Expecting more damping to mean faster settling. Fastest return to rest happens exactly at critical damping. Overdamped systems inherit the slow root and take longer, as the -1 and -4 example showed.
Treating resonance as exotic. It is ordinary undetermined coefficients with an overlap, and it appears any time a forcing frequency matches a natural one: swings, bridges, wine glasses, and badly mounted washing machines all obey the same growing t sin(omega t) term.
Translating the circuit dictionary halfway. The stiffness analog is 1/C, not C. A larger capacitor means a softer spring, which is why the substitution trips people who translate symbols instead of roles.
Try it
A mass-spring system has m = 1, c = 2, k = 10, released with x(0) = 2 and x'(0) = 1. Classify the damping and find x(t).
Worked answer. The equation is x'' + 2x' + 10x = 0. Discriminant: c^2 - 4mk = 4 - 40 = -36 < 0: underdamped, so it will ring. Roots: r = (-2 +/- sqrt(-36))/2 = -1 +/- 3i, giving x = e^(-t)[C_1 cos(3t) + C_2 sin(3t)]. Apply x(0) = 2: C_1 = 2. Differentiate with the product rule and evaluate at zero: x'(0) = -C_1 + 3 C_2 = 1, so 3 C_2 = 3 and C_2 = 1.
The motion is x = e^(-t)[2 cos(3t) + sin(3t)]: a vibration at frequency 3 radians per second inside an envelope of size sqrt(4 + 1) = sqrt(5) approximately 2.24 that decays by the factor e^(-1) approximately 0.37 each second. In circuit language, the same answer describes the fading charge oscillation of an L = 1, R = 2, 1/C = 10 loop. If your classification, constants, and interpretation all match, both physical worlds are now yours.
Recap
Newton's law turns springs into m x'' + c x' + k x = F(t), with inertia, damping, and restoring force as the three left-side terms. Free undamped motion oscillates forever at omega_0 = sqrt(k/m); damping sorts by the discriminant c^2 - 4mk into ringing, critical, and sluggish returns, with critical the fastest settler. Driving at the natural frequency triggers resonance, the growing t sin(omega_0 t) response that damping alone tames.
The RLC circuit repeats the entire story under new names, with L, R, 1/C standing in for m, c, k and charge for position, because Kirchhoff's loop law and Newton's second law produce the same differential equation. This portability is the quiet superpower of the subject: solve the equation once, and every system wearing its shape, mechanical or electrical, is solved with it. Module 6 next introduces the Laplace transform, a second and very different route to these same answers.
Sources
- Lebl, J. (n.d.). Mechanical vibrations. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Lebl, J. (n.d.). Forced oscillations and resonance. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Dawkins, P. (n.d.). Mechanical Vibrations. Paul's Online Math Notes, Lamar University. tutorial.math.lamar.edu
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- Mattuck, A., Miller, H., Orloff, J., & Lewis, J. (2010). 18.03 Differential equations [Course materials]. MIT OpenCourseWare. ocw.mit.edu
- Key terms
- Spring-mass equation
- m x'' + c x' + k x = F(t), Newton's law for a damped, driven oscillator.
- Natural frequency
- omega_0 = sqrt(k/m), the rate of free undamped oscillation.
- Underdamped
- c^2 < 4mk; the system oscillates with a decaying amplitude.
- Critically damped
- c^2 = 4mk; the fastest return to equilibrium without oscillating.
- RLC circuit equation
- L q'' + R q' + (1/C) q = E(t), the electrical twin of the spring-mass system.
Module 6: The Laplace Transform
Learn a transform that turns differential equations into algebra and solves initial value problems directly.
Definition and Basic Transforms
- State the definition of the Laplace transform as an integral.
- Compute transforms of basic functions from the definition or a table.
- Use linearity to transform sums and constant multiples.
The Laplace transform is a machine that converts a function of time f(t) into a new function of a variable s. Its power is that calculus operations (derivatives) become algebra operations (multiplication) in the new world, so a differential equation becomes an algebraic equation you can solve by hand. The transform is defined by the integral
F(s) = L{f(t)} = integral from 0 to infinity of e^(-s t) f(t) dt
for values of s large enough that the integral converges. We write L{f(t)} = F(s), using a capital letter for the transform.
Read the definition aloud, one piece at a time: take your function of time, multiply it by the decaying probe e^(-s t), and add up the product over all time from zero onward. The result no longer depends on t, which was integrated away; it depends on s, the steepness of the probe. One input function, one output function, different worlds.
The big picture
Transforms are an old and honorable strategy: move a hard problem to a world where it is easy, solve it there, and move back. Logarithms did this for sailors' arithmetic, turning multiplication into addition. The Laplace transform does it for differential equations, turning differentiation into multiplication by s. The full payoff arrives next lesson; this lesson builds the vocabulary, computing the transforms of the basic functions and learning the one algebraic property, linearity, that lets us combine them.
Two practical notes about the definition. The integral runs to infinity, so it is an improper integral: the honest meaning is the limit of integral from 0 to T as T grows without bound. And convergence is a negotiation between f and the probe: e^(-s t) must shrink fast enough to overpower the growth of f(t). Larger s means a steeper probe, so each transform comes with a region like s > 0 or s > a where the integral makes sense. For the functions of this course, some s always works.
Key idea: the transform trades a function of time for a function of s, and it exists wherever the probe e^(-s t) decays faster than f grows.
Worked example, from the definition
Find L{1}. With f(t) = 1:
L{1} = integral from 0 to infinity of e^(-s t) dt.- The antiderivative is
-(1/s) e^(-s t). Evaluate from 0 to infinity: at the tope^(-s t) to 0(fors > 0), at the bottom it is-(1/s)(1) = -1/s. - The result is
0 - (-1/s) = 1/s.
So L{1} = 1/s. A similar computation gives L{e^(a t)} = 1/(s - a), valid for s > a.
Run that similar computation in full, because it is the single most used entry in the subject. With f(t) = e^(a t), the integrand is e^(-s t) e^(a t) = e^(-(s - a) t), by adding exponents. This is the previous integral with s replaced by s - a: the antiderivative is -(1/(s - a)) e^(-(s - a) t), the top contributes 0 provided s - a > 0, and the bottom contributes 1/(s - a). Hence L{e^(a t)} = 1/(s - a) for s > a. Notice the convergence condition appearing naturally: the probe must out-decay the exponential it is measuring.
One more from the definition: L{t}, which needs integration by parts. Take u = t and dv = e^(-s t) dt, so du = dt and v = -(1/s) e^(-s t). Then the integral equals [-(t/s) e^(-s t)] evaluated from 0 to infinity, plus (1/s) integral from 0 to infinity of e^(-s t) dt. The boundary term vanishes at both ends (exponential decay beats linear growth at the top; the factor t = 0 kills the bottom), and the remaining integral is the L{1} we already know. So L{t} = (1/s)(1/s) = 1/s^2.
Repeating the by-parts argument peels one power of t per round and deposits one factor over s each time, which is where the factorial in L{t^n} = n!/s^(n+1) comes from: n rounds of parts contribute the product n (n-1) ... 1. The sine and cosine entries below can be earned the same way, with two rounds of parts and a little algebra, or more slickly with Euler's formula; either way they land where the table says.
A table of essential transforms
These are the building blocks; memorize the common ones and keep the rest handy.
| f(t) | F(s) = L{f(t)} |
| 1 | 1/s |
| t | 1/s^2 |
| t^n | n! / s^(n+1) |
| e^(a t) | 1/(s - a) |
| sin(b t) | b/(s^2 + b^2) |
| cos(b t) | s/(s^2 + b^2) |
Learn to read the table in both directions. Forward: t^3 has transform 3!/s^4 = 6/s^4. Backward: a function of s like 1/(s - 5) is recognized as the transform of e^(5t). The backward reading is called the inverse transform, and next lesson it is the final step of every solution, so a few minutes of two-way practice now pays off immediately. Small fingerprints help: denominators s^2 + b^2 signal oscillation, with sine carrying the constant b upstairs and cosine carrying s; plain powers of s signal polynomials; shifted denominators s - a signal exponentials.
Linearity
The Laplace transform is linear: the transform of a sum is the sum of the transforms, and constants pull out.
L{a f(t) + b g(t)} = a L{f(t)} + b L{g(t)}.
Worked example. Find L{3 + 2t - e^(4t)}. Apply the table term by term: L{3} = 3/s, L{2t} = 2/s^2, and L{e^(4t)} = 1/(s - 4). So the transform is
3/s + 2/s^2 - 1/(s - 4).
Linearity plus the short table already lets you transform any polynomial, exponential, or sinusoid. In the next lesson we transform derivatives, which is where the method earns its keep.
Why does linearity hold? Because integration itself is linear: the integral of a sum is the sum of the integrals, and constants slide out front. The transform inherits every property the integral has. But be careful what linearity does not say: it says nothing about products. L{f g} is not L{f} L{g}, and a function like t e^(4t) cannot be transformed by multiplying 1/s^2 and 1/(s - 4).
One more rehearsal with a shared denominator: L{4 cos(3t) - sin(3t)}. The table gives 4s/(s^2 + 9) for the cosine piece and 3/(s^2 + 9) for the sine piece, so the transform is (4s - 3)/(s^2 + 9). Combining over the common denominator is optional going forward, but next lesson runs this exact move in reverse, splitting one s-expression into a cosine part and a sine part, so seeing the forward direction once makes the reverse feel familiar.
Products with exponentials have their own elegant rule, the s-shift: multiplying by e^(a t) in the time world shifts s to s - a in the transform world, that is, L{e^(a t) f(t)} = F(s - a). The proof is one line from the definition: the factors e^(-s t) e^(a t) merge into e^(-(s - a) t), which is the original integral with a shifted s.
Watch the rule work twice. L{t e^(4t)} takes F(s) = 1/s^2, the transform of t, and shifts every s to s - 4: the answer is 1/(s - 4)^2. Likewise L{e^(-t) cos(2t)} starts from s/(s^2 + 4) and shifts by a = -1, giving (s + 1)/((s + 1)^2 + 4). Shifting by a negative a moves s to s + 1, the same sign flip we met in 1/(s - a). This rule is the algebraic face of damped oscillation, and it will star in the partial-fraction inversions of the next lesson.
Key idea: sums and constant multiples pass straight through the transform; products do not. Exponential factors shift s instead.
Where people get stuck
Treating s as a number to evaluate. The answer to a transform problem is a function of s, left as a formula. Nothing gets plugged in; s is the new independent variable.
Losing the lower limit. The improper integral has two ends. The upper end usually contributes 0 through decay, and the entire answer typically comes from the t = 0 end, as in 0 - (-1/s) = 1/s. Dropping the minus signs at that step is the most common arithmetic slip in the subject.
Off-by-one in the power rule. The denominator exponent is one more than the power: L{t^n} = n!/s^(n+1), so L{t^2} = 2/s^3, not 2/s^2. The extra power comes from the final L{1} = 1/s at the bottom of the by-parts cascade.
Multiplying transforms for products. Linearity covers sums only. For e^(a t) times a function, use the s-shift; for general products, this course simply does not need them.
Swapping the sine and cosine numerators. Sine, which starts at 0, carries the constant b; cosine, which starts at 1, carries the s. If unsure, check at large s: s/(s^2 + b^2) behaves like 1/s, matching the fact that cos(0) = 1 looks like the constant 1 near t = 0.
Try it
First, use the definition to derive L{e^(3t)}. Second, use the table and linearity to find L{7 - 2t^3 + 5 e^(-2t)}.
Worked answer, the derivation. L{e^(3t)} = integral from 0 to infinity of e^(-s t) e^(3t) dt = integral from 0 to infinity of e^(-(s - 3) t) dt. The antiderivative is -(1/(s - 3)) e^(-(s - 3) t). For s > 3, the top end gives 0 and the bottom end gives -(1/(s - 3)), so the integral is 0 - (-(1/(s - 3))) = 1/(s - 3). The table entry is confirmed, together with its region s > 3.
Worked answer, the linear combination. Term by term: L{7} = 7/s. For t^3, the power rule gives 3!/s^4 = 6/s^4, so the middle term contributes -12/s^4. For the exponential, a = -2, so L{e^(-2t)} = 1/(s + 2), contributing 5/(s + 2). Assembled: L{7 - 2t^3 + 5 e^(-2t)} = 7/s - 12/s^4 + 5/(s + 2). Notice the minus sign inside 1/(s - a) flipping to a plus when a is negative; narrating that step aloud once is the cheapest insurance against it.
Recap
The Laplace transform integrates f(t) against the probe e^(-s t) from 0 to infinity, producing a function F(s) that exists for s large enough. From the definition we derived L{1} = 1/s, L{e^(a t)} = 1/(s - a), and L{t} = 1/s^2 by parts, with the factorial pattern n!/s^(n+1) emerging from repeated peeling; sines and cosines fill out the six-row table every problem in this module uses.
Linearity lets the table handle any sum of basic pieces, the s-shift handles exponential multiples, and reading the table backward is the inverse skill the next lesson leans on. What we have not yet transformed is a derivative. That single rule, L{y'} = s Y - y(0), is where the machine connects to differential equations, and it is the first thing the next lesson builds.
Sources
- Lebl, J. (n.d.). The Laplace transform. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Lebl, J. (n.d.). Table of Laplace transforms. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Dawkins, P. (n.d.). The Definition of the Laplace Transform. Paul's Online Math Notes, Lamar University. tutorial.math.lamar.edu
- Khan Academy. (n.d.). Laplace transform. khanacademy.org
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- O'Connor, J. J., & Robertson, E. F. (n.d.). Pierre-Simon Laplace. MacTutor History of Mathematics Archive, University of St Andrews. mathshistory.st-andrews.ac.uk
- Key terms
- Laplace transform
- The integral L{f} = integral from 0 to infinity of e^(-s t) f(t) dt, turning a function of t into a function of s.
- Transform variable s
- The new variable in the s-domain; the integral converges for s large enough.
- Linearity
- L{a f + b g} = a L{f} + b L{g}; constants and sums pass through the transform.
- Transform table
- A list of standard f(t) and their transforms F(s), used to avoid re-integrating.
- s-domain
- The world of functions of s, where derivatives become multiplication and algebra replaces calculus.
Solving Initial Value Problems with Laplace Transforms
- Transform a derivative using the rule that brings in initial conditions.
- Solve an initial value problem by transforming, doing algebra, and inverting.
- Use partial fractions to prepare for the inverse transform.
The Laplace method shines on initial value problems because the transform of a derivative automatically absorbs the initial conditions. The two key rules are
L{y'} = s Y(s) - y(0)
L{y''} = s^2 Y(s) - s y(0) - y'(0)
where Y(s) = L{y(t)}. Each derivative becomes multiplication by s, minus the initial data. A differential equation in t turns into an algebraic equation in Y(s).
The big picture
The first rule is not a decree; it falls out of integration by parts, and the derivation is worth one viewing. Start from the definition: L{y'} = integral from 0 to infinity of e^(-s t) y'(t) dt. Take u = e^(-s t) and dv = y' dt, so du = -s e^(-s t) dt and v = y.
Then the integral equals [e^(-s t) y(t)] from 0 to infinity plus s integral from 0 to infinity of e^(-s t) y dt. The boundary term gives 0 - y(0) (decay at the top, the plain value at the bottom), and the surviving integral is s Y(s). Hence L{y'} = s Y - y(0).
The second-derivative rule is the first rule applied twice: treat y'' as the derivative of y', so L{y''} = s L{y'} - y'(0) = s(s Y - y(0)) - y'(0) = s^2 Y - s y(0) - y'(0). Notice the pattern: each derivative costs one factor of s and deposits one piece of initial data. This is the promised trade of calculus for algebra, with the starting conditions billed at the door instead of at the end.
Key idea: differentiation in the time world is multiplication by s in the transform world, minus the initial values. The IVP's data enters on line one.
The three-step recipe
- Transform both sides of the equation, using the derivative rules to insert the initial conditions.
- Solve algebraically for
Y(s). - Invert
Y(s)back toy(t)using the table, with partial fractions if needed.
Compare this with the Module 4 workflow: there, we found a general solution with free constants and hunted the constants afterward with the initial conditions. Here the conditions are woven in at step 1, so what emerges at step 3 is the particular solution directly. Neither method is more correct; the transform route simply reorganizes the labor, and it scales especially well when forcing terms appear on the right side.
Worked example, first order
Solve y' + 3y = 0, y(0) = 2.
- Transform:
[s Y - y(0)] + 3 Y = 0, that iss Y - 2 + 3 Y = 0. - Solve:
(s + 3) Y = 2, soY = 2/(s + 3). - Invert:
1/(s + 3)is the transform ofe^(-3t), soy = 2 e^(-3t).
Read the flow once more. The differential equation became the linear equation (s + 3) Y = 2, ordinary algebra; the initial value 2 rode along in the numerator; and the table entry 1/(s - a) with a = -3 carried us home. Checking is instant: y(0) = 2, and y' = -6 e^(-3t) = -3 y. The old method (separation, or the characteristic idea) gives the same answer; the transform just gets there without a constant-finding step.
Worked example, second order
Solve y'' + 4y = 0, y(0) = 3, y'(0) = 0.
- Transform:
[s^2 Y - s y(0) - y'(0)] + 4 Y = 0, that iss^2 Y - 3s - 0 + 4 Y = 0. - Solve:
(s^2 + 4) Y = 3s, soY = 3s/(s^2 + 4). - Invert:
s/(s^2 + 4)is the transform ofcos(2t), soy = 3 cos(2t).
Notice the initial conditions were built in from the start, so there is no separate step of solving for arbitrary constants at the end. That is the practical advantage over the characteristic-equation method.
Try the same equation with a nonzero starting velocity, y(0) = 3 and y'(0) = 8, the exact IVP from Lesson 2 of Module 1. The transform gives s^2 Y - 3s - 8 + 4Y = 0, so Y = (3s + 8)/(s^2 + 4).
Split the fraction into table-shaped pieces: 3s/(s^2 + 4) inverts to 3 cos(2t), and 8/(s^2 + 4) = 4 * [2/(s^2 + 4)] inverts to 4 sin(2t). So y = 3 cos(2t) + 4 sin(2t), exactly the answer Module 1 earned with two conditions and two constants. Two very different roads, one function, which is precisely what should happen.
Key idea: after solving for Y, break it into table entries. Cosine claims the s numerators, sine claims the constants, and each sine entry needs its factor of b adjusted by hand.
Partial fractions for the inverse
Often Y(s) is a rational function that is not directly in the table, and partial fractions break it into pieces that are.
Worked example. Solve y' - y = e^(2t), y(0) = 0.
- Transform:
s Y - 0 - Y = 1/(s - 2), so(s - 1) Y = 1/(s - 2)andY = 1/[(s - 1)(s - 2)]. - Partial fractions:
1/[(s - 1)(s - 2)] = A/(s - 1) + B/(s - 2). Clearing denominators,1 = A(s - 2) + B(s - 1). Sets = 2:1 = B. Sets = 1:1 = -A, soA = -1. - So
Y = -1/(s - 1) + 1/(s - 2), which inverts term by term toy = -e^t + e^(2t).
You can check: y(0) = -1 + 1 = 0 matches, and y' - y = (-e^t + 2e^(2t)) - (-e^t + e^(2t)) = e^(2t), the correct right side.
Partial fractions is ordinary fraction addition run backward. Adding -1/(s - 1) and 1/(s - 2) over a common denominator produces exactly 1/[(s - 1)(s - 2)]; the method recovers the summands from the sum. The root-plugging trick in step 2 works because setting s equal to a root wipes out every term but one: at s = 2, the factor (s - 2) kills the A term, leaving an equation for B alone. With distinct linear factors, each unknown falls out of one substitution, no simultaneous equations required.
Two upgrades appear in practice. A repeated factor like (s + 3)^2 requests two terms, A/(s + 3) + B/(s + 3)^2, and the second inverts through the s-shift as B t e^(-3t). An irreducible quadratic like s^2 + 2s + 5 is handled by completing the square, (s + 1)^2 + 4, and the shifted table entries deliver e^(-t) cos(2t) and e^(-t) sin(2t) pieces: damped oscillations, the Module 5 cast re-entering through the transform door.
A driven example, checked against Module 2
Solve y' + 2y = 4, y(0) = 3, which Lesson 4 of Module 2 solved with an integrating factor.
- Transform both sides; the constant forcing uses
L{4} = 4/s:s Y - 3 + 2Y = 4/s. - Solve for
Y:(s + 2) Y = 3 + 4/s = (3s + 4)/s, soY = (3s + 4)/[s(s + 2)]. - Partial fractions:
(3s + 4)/[s(s + 2)] = A/s + B/(s + 2). Clear denominators:3s + 4 = A(s + 2) + B s. Sets = 0:4 = 2A, soA = 2. Sets = -2:-2 = -2B, soB = 1. - Invert:
Y = 2/s + 1/(s + 2)givesy = 2 + e^(-2t).
The integrating factor produced y = 2 + e^(-2x); the transform reproduces it to the letter, with the equilibrium 2 arriving as the 2/s term and the transient as 1/(s + 2). When two methods you trust disagree, one of them contains an arithmetic slip; when they agree, you may move on with unusual confidence.
Where people get stuck
Dropping a minus sign in the derivative rules. The data enters as -y(0) and -s y(0) - y'(0), all subtracted. Writing the rule out fully in brackets before substituting numbers, as the worked examples do, keeps the signs attached.
Forgetting the forcing term's transform. The right side transforms too: a constant 4 becomes 4/s, an e^(2t) becomes 1/(s - 2). Leaving the right side untransformed mixes the two worlds in one equation.
Inverting a product as a product. 1/[(s - 1)(s - 2)] is not e^t e^(2t). Products of transforms do not invert termwise; partial fractions exist precisely to convert the product into a sum, which does invert termwise.
Missing the b adjustment on sine. To invert 8/(s^2 + 4), factor out enough to expose 2/(s^2 + 4), the true sine entry, and carry the leftover 4 outside. Inverting straight to 8 sin(2t) doubles the answer.
Stopping at Y(s). The transform is scaffolding. An IVP's answer is a function of t; step 3 is not optional, and a quick check of y(0) against the given data takes five seconds.
Try it
Solve y' + y = 6 e^(2t), y(0) = 0, by transform, partial fractions, and inversion.
Worked answer. Transform: s Y - 0 + Y = 6/(s - 2), so (s + 1) Y = 6/(s - 2) and Y = 6/[(s + 1)(s - 2)]. Partial fractions: write 6/[(s + 1)(s - 2)] = A/(s + 1) + B/(s - 2) and clear denominators: 6 = A(s - 2) + B(s + 1). Set s = 2: 6 = 3B, so B = 2. Set s = -1: 6 = -3A, so A = -2.
Then Y = -2/(s + 1) + 2/(s - 2), which inverts to y = -2 e^(-t) + 2 e^(2t). Check both facts: y(0) = -2 + 2 = 0, and y' + y = (2 e^(-t) + 4 e^(2t)) + (-2 e^(-t) + 2 e^(2t)) = 6 e^(2t). The equation and the initial condition both hold, so the inversion and the algebra are sound.
Recap
The derivative rules L{y'} = s Y - y(0) and L{y''} = s^2 Y - s y(0) - y'(0), both earned by integration by parts, convert an initial value problem into one algebraic equation in Y(s) with the starting data already inside. The recipe is transform, solve, invert; the inversion leans on the table, on the sine-cosine numerator split, and on partial fractions to dismantle products into table-ready sums, with repeated factors and completed squares handling the fancier denominators.
The method reproduces every answer our earlier tools produced, as the cross-checked examples showed, and it will be the natural language for systems and for discontinuous forcing in later study. What matters now is fluency in the loop: data in at the transform step, algebra in the middle, a function of t out the far end, and a two-line check against the original problem to close the case.
Sources
- Lebl, J. (n.d.). Transforms of derivatives and ODEs. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Dawkins, P. (n.d.). Solving IVPs with Laplace Transforms. Paul's Online Math Notes, Lamar University. tutorial.math.lamar.edu
- Khan Academy. (n.d.). Laplace transform. khanacademy.org
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- Mattuck, A., Miller, H., Orloff, J., & Lewis, J. (2010). 18.03 Differential equations [Course materials]. MIT OpenCourseWare. ocw.mit.edu
- O'Connor, J. J., & Robertson, E. F. (n.d.). Pierre-Simon Laplace. MacTutor History of Mathematics Archive, University of St Andrews. mathshistory.st-andrews.ac.uk
- Key terms
- Transform of a derivative
- L{y'} = s Y - y(0) and L{y''} = s^2 Y - s y(0) - y'(0), which insert the initial data.
- Y(s)
- The Laplace transform of the unknown y(t), the quantity you solve for algebraically.
- Inverse Laplace transform
- Recovering y(t) from Y(s), usually by matching the table.
- Partial fractions
- Splitting a rational Y(s) into simpler fractions that appear in the transform table.
- Algebraic equation in s
- The transformed problem, where derivatives have become multiplication by s.
Module 7: Systems and Numerical Methods
Extend to coupled systems of equations solved with eigenvalues, then approximate solutions numerically with Euler's method.
Systems of First-Order Equations
- Write a system of two first-order linear equations in matrix form.
- Find eigenvalues and eigenvectors of a 2x2 coefficient matrix.
- Assemble the general solution of the system from eigenvalues and eigenvectors.
Real systems often have several quantities changing together, each rate depending on all of them. Two interacting populations, or two coupled tanks, lead to a system of first-order equations. A linear system in two unknowns x(t) and y(t) looks like
x' = a x + b y, y' = c x + d y,
which we write compactly in matrix form as X' = A X, where X = [x, y] and A is the 2x2 coefficient matrix with rows [a, b] and [c, d].
Read the system aloud: the rate of each unknown is a recipe mixing all the unknowns. Neither equation can be solved alone, because each one leans on the other's variable. That coupling is the new difficulty, and this lesson's two methods, the eigenvalue idea and elimination, are both strategies for uncoupling what the model tangled together.
The big picture
For one equation, y' = k y, everything flowed from the exponential e^(k t). For a system, the constant k has grown into a matrix A, and matrices do something numbers never did: they treat different directions differently. A matrix can stretch one direction by 3 while shrinking another by half. So the natural question becomes: are there directions the matrix treats like a plain number, stretching without turning? Those special directions are the eigenvectors, and along them the system collapses back into the one-variable equation we already know how to solve.
The solution strategy is therefore: find the special directions and their stretch factors, write one exponential solution per direction, and combine them with superposition, which holds here for the same linearity reasons as in Module 4. Two directions, two exponentials, two constants: the second-order story retold with vectors.
Key idea: eigenvectors are the directions where a coupled system behaves like a single equation. Each one contributes a solution v e^(lambda t).
The eigenvalue idea
Just as the single equation y' = k y had solution e^(k t), we look for solutions of the form X = v e^(lambda t), where v is a constant vector and lambda a constant. Substituting gives lambda v e^(lambda t) = A v e^(lambda t), and cancelling the exponential leaves the eigenvalue equation
A v = lambda v.
So lambda must be an eigenvalue of A and v a matching eigenvector. Eigenvalues come from the characteristic equation det(A - lambda I) = 0, which for a 2x2 matrix is
lambda^2 - (a + d) lambda + (a d - b c) = 0.
Where does the determinant condition come from? Rearrange A v = lambda v into (A - lambda I) v = 0. We need a nonzero vector v sent to zero, and a matrix crushes a nonzero vector to zero only when it is singular, that is, when its determinant vanishes. Setting det(A - lambda I) = 0 is the demand that the matrix A - lambda I be degenerate enough to have a null direction.
Expanding the 2x2 determinant, (a - lambda)(d - lambda) - b c, produces the quadratic above, whose coefficients have names worth knowing: a + d is the trace and a d - b c is the determinant of A.
Key idea: the quadratic lambda^2 - (trace) lambda + (det) = 0 plays exactly the role the characteristic equation played in Module 4, and its two roots drive the two modes of the system.
Worked example
Solve the system x' = x + y, y' = 4x + y. The matrix A has rows [1, 1] and [4, 1].
- Eigenvalues:
det(A - lambda I) = (1 - lambda)^2 - (1)(4) = 0. Expand:(1 - lambda)^2 = 4, so1 - lambda = +/- 2, givinglambda = -1andlambda = 3. - Eigenvector for lambda = 3: solve
(A - 3I) v = 0. The first row gives(1 - 3) v_1 + v_2 = -2 v_1 + v_2 = 0, sov_2 = 2 v_1; takev = [1, 2]. - Eigenvector for lambda = -1: the first row gives
(1 + 1) v_1 + v_2 = 2 v_1 + v_2 = 0, sov_2 = -2 v_1; takev = [1, -2].
Before assembling the answer, verify one eigenpair with bare arithmetic, because the check is so cheap. Multiply A by [1, 2]: the first entry is 1(1) + 1(2) = 3, the second is 4(1) + 1(2) = 6. The result [3, 6] is exactly 3 [1, 2]: the matrix stretched the vector by 3 without turning it, which is the entire meaning of an eigenpair. Note also that the second row of (A - 3I) gives 4 v_1 - 2 v_2 = 0, the same relation as the first row; that redundancy is expected, and its absence signals an arithmetic slip upstream.
The general solution combines the two eigen-solutions:
X = C_1 [1, 2] e^(3t) + C_2 [1, -2] e^(-t).
Written out, x = C_1 e^(3t) + C_2 e^(-t) and y = 2 C_1 e^(3t) - 2 C_2 e^(-t). The sign of each eigenvalue tells the story: the lambda = 3 direction grows, the lambda = -1 direction decays. Real distinct eigenvalues behave much like the two-real-roots case of a single second-order equation, which is no accident: a second-order equation can always be rewritten as a first-order system.
Finish with data. Impose x(0) = 3, y(0) = 2. At t = 0 the exponentials equal 1, so C_1 + C_2 = 3 and 2 C_1 - 2 C_2 = 2, that is C_1 - C_2 = 1. Adding the two equations: 2 C_1 = 4, so C_1 = 2 and C_2 = 1.
The particular solution is x = 2 e^(3t) + e^(-t), y = 4 e^(3t) - 2 e^(-t). In the long run both components follow the growing mode, and the point (x, y) slides ever closer to the line through [1, 2]: the eigenvector is visible in the trajectory.
Elimination, the other road
The same system yields to a method with no matrices at all: eliminate one unknown. From the first equation, y = x' - x. Differentiate the first equation: x'' = x' + y', and substitute the second equation for y': x'' = x' + 4x + y. Now replace the remaining y with x' - x: x'' = x' + 4x + x' - x = 2x' + 3x, so
x'' - 2x' - 3x = 0.
This is Module 4 territory: the characteristic equation r^2 - 2r - 3 = (r - 3)(r + 1) = 0 has roots 3 and -1, precisely the eigenvalues found above, and x = C_1 e^(3t) + C_2 e^(-t). Recover the partner from y = x' - x = (3 C_1 e^(3t) - C_2 e^(-t)) - (C_1 e^(3t) + C_2 e^(-t)) = 2 C_1 e^(3t) - 2 C_2 e^(-t), matching the eigenvector answer coefficient for coefficient. Elimination and the eigen-method are two roads up the same mountain, and the shared quadratic is why the view from the top is identical.
A second worked example, where symmetry decouples
Solve x' = 2x + y, y' = x + 2y, with matrix rows [2, 1] and [1, 2]. Trace is 4 and determinant is 4 - 1 = 3, so the characteristic equation is lambda^2 - 4 lambda + 3 = (lambda - 1)(lambda - 3) = 0: eigenvalues 1 and 3.
For lambda = 3: (2 - 3) v_1 + v_2 = 0 gives v_2 = v_1, eigenvector [1, 1]. For lambda = 1: (2 - 1) v_1 + v_2 = 0 gives v_2 = -v_1, eigenvector [1, -1]. So X = C_1 [1, 1] e^(3t) + C_2 [1, -1] e^(t).
Here the eigenvectors have a story you can feel. Add the two original equations: (x + y)' = 3(x + y). Subtract them: (x - y)' = (x - y). The sum grows like e^(3t) and the difference like e^t, each obeying a plain one-variable equation. The eigenvector [1, 1] is the sum direction and [1, -1] is the difference direction: eigenvectors are exactly the coordinates in which a coupled system falls apart into independent single equations. That is the deepest way to say what this lesson is about.
Where people get stuck
Sign slips inside the determinant. The subtraction happens on the diagonal only: (a - lambda)(d - lambda) - b c. Subtracting lambda from all four entries is the classic error, and the trace-determinant shortcut is a fast cross-check on the quadratic.
Expecting two independent conditions from the eigenvector rows. The two rows of (A - lambda I) must agree when lambda is a true eigenvalue. One relation, one free scale, is the healthy outcome; two conflicting relations mean the eigenvalue is wrong.
Worrying about eigenvector scale. Any nonzero multiple serves: [1, 2] and [2, 4] generate the same solutions, with the constant C absorbing the difference. Pick small whole numbers and move on.
Mismatching pairs. Each exponential must carry its own eigenvector: [1, 2] belongs to e^(3t), not e^(-t). Swapping partners produces a formula that fails the A v = lambda v check immediately.
Giving x and y separate constants. The system's solution has two constants total, one per mode, shared by both components. Writing four constants breaks the coupling the equations demand.
Try it
Solve the system x' = y, y' = -2x - 3y, with matrix rows [0, 1] and [-2, -3].
Worked answer. Trace is -3, determinant is 0(-3) - 1(-2) = 2, so the characteristic equation is lambda^2 + 3 lambda + 2 = (lambda + 1)(lambda + 2) = 0: eigenvalues -1 and -2. For lambda = -1: (0 + 1) v_1 + v_2 = 0, so v_2 = -v_1, eigenvector [1, -1]. For lambda = -2: (0 + 2) v_1 + v_2 = 0, so v_2 = -2 v_1, eigenvector [1, -2].
The general solution is X = C_1 [1, -1] e^(-t) + C_2 [1, -2] e^(-2t), that is x = C_1 e^(-t) + C_2 e^(-2t) and y = -C_1 e^(-t) - 2 C_2 e^(-2t). Both eigenvalues are negative, so every trajectory decays to the origin. One more observation ties the course together: this system is x'' + 3x' + 2x = 0 in disguise, rewritten with y = x', and its eigenvalues are that equation's characteristic roots. If you spotted the disguise, the whole architecture of Modules 4 and 7 is standing in one frame.
Recap
Coupled linear systems X' = A X are solved by hunting the directions the matrix merely stretches. The trial X = v e^(lambda t) leads to A v = lambda v, eigenvalues arrive from det(A - lambda I) = 0, a quadratic built from the trace and determinant, and each eigenpair contributes a mode v e^(lambda t); superposition assembles the general solution, and initial values fix the two constants.
Elimination reaches the same answers by compressing the system into one second-order equation with the same characteristic roots, and symmetric examples reveal eigenvectors as the decoupling coordinates in which the tangle becomes two independent decays or growths. Signs of eigenvalues narrate the long run: all negative means settling, any positive means escape along its eigenvector. The final lesson turns from exact formulas to the numerical method computers use when no formula exists.
Sources
- Lebl, J. (n.d.). Introduction to systems of ODEs. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Lebl, J. (n.d.). Eigenvalue method. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Dawkins, P. (n.d.). Systems of Differential Equations. Paul's Online Math Notes, Lamar University. tutorial.math.lamar.edu
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- Mattuck, A., Miller, H., Orloff, J., & Lewis, J. (2010). 18.03 Differential equations [Course materials]. MIT OpenCourseWare. ocw.mit.edu
- Lotka, A. J. (1920). Analytical note on certain rhythmic relations in organic systems. Proceedings of the National Academy of Sciences, 6(7), 410-415. doi.org/10.1073/pnas.6.7.410
- Kermack, W. O., & McKendrick, A. G. (1927). A contribution to the mathematical theory of epidemics. Proceedings of the Royal Society of London. Series A, 115(772), 700-721. doi.org/10.1098/rspa.1927.0118
- Key terms
- System of ODEs
- Several first-order equations whose rates depend on all the unknowns, written X' = A X.
- Coefficient matrix
- The matrix A of constants multiplying the unknowns in a linear system.
- Eigenvalue
- A number lambda satisfying det(A - lambda I) = 0; it plays the role of an exponent.
- Eigenvector
- A nonzero vector v with A v = lambda v, giving the direction of an eigen-solution.
- Characteristic equation of a matrix
- det(A - lambda I) = 0, the equation whose roots are the eigenvalues.
Numerical Methods: Euler's Method
- Explain why numerical methods are needed when no formula exists.
- Apply Euler's method to step forward from an initial condition.
- Discuss step size, accuracy, and the source of error.
Most differential equations that arise in practice cannot be solved with a neat formula. When exact methods fail, we approximate the solution numerically, computing the value of y at a sequence of points. The simplest such scheme is Euler's method, and it captures the core idea behind all the others.
The big picture
Every method in this course has been a formula factory: separation, integrating factors, characteristic equations, transforms. But the factory has a limited catalog. An innocent-looking equation like y' = x^2 + y^2 has no solution expressible in elementary functions at all, and equations from weather models, orbital mechanics, and battery chemistry are far worse. Yet planes fly and forecasts run, because a differential equation that defies formulas still yields to arithmetic.
The key is the speedometer picture one final time. The equation y' = f(x, y) is a rule that assigns a slope to every point of the plane: a field of tiny arrows. A solution is a curve that follows the arrows everywhere. Euler's method builds such a curve the way a hiker follows trail markers: stand at a point, read the arrow, walk a short straight stretch in that direction, then stop and read again. No formula, only repeated looking and stepping.
Key idea: a differential equation is a slope field, and numerical methods walk through it. Arithmetic replaces antiderivatives.
The idea, follow the slope
Suppose we have an initial value problem y' = f(x, y) with y(x_0) = y_0. The equation hands us the slope at any point: it is just f(x, y). Euler's method starts at the known point and repeatedly takes a short straight step in the direction of the current slope. Choose a small step size h. Then update:
x_(n+1) = x_n + h
y_(n+1) = y_n + h f(x_n, y_n)
In words: the new y is the old y plus the step size times the slope there. Geometrically, you walk along the tangent line for a short distance, then recompute the slope and repeat, tracing a polygonal path that approximates the true curve.
The update rule is nothing more exotic than the point-slope line from algebra: starting at height y_n and climbing at rate f(x_n, y_n) for a run of h gains rise h f(x_n, y_n). Each step commits to one slope for its whole length, which is a small lie, since the true solution bends continuously. The art of the subject is managing that lie: keep steps short, and the polygon hugs the curve.
Worked example
Approximate y(0.3) for y' = x + y, y(0) = 1, using step size h = 0.1. Here f(x, y) = x + y.
| n | x_n | y_n | slope f = x_n + y_n | y_(n+1) = y_n + 0.1 f |
| 0 | 0.0 | 1.000 | 0 + 1.000 = 1.000 | 1.000 + 0.1(1.000) = 1.100 |
| 1 | 0.1 | 1.100 | 0.1 + 1.100 = 1.200 | 1.100 + 0.1(1.200) = 1.220 |
| 2 | 0.2 | 1.220 | 0.2 + 1.220 = 1.420 | 1.220 + 0.1(1.420) = 1.362 |
| 3 | 0.3 | 1.362 | - | - |
Narrate the rows to make the table yours. Row 0: at (0, 1) the slope is 0 + 1 = 1, so a step of 0.1 raises y by 0.1 * 1 = 0.1, landing at 1.100. Row 1: both x and y have grown, so the slope has grown too, to 1.200, and the next rise is 0.120. Row 2: the slope is 1.420 and the final rise is 0.142. Each row reads the field where the walker actually stands, which is why the rises keep increasing: this solution is speeding up, and the method notices.
So Euler's method estimates y(0.3) approximately 1.362. The exact solution of this equation is y = 2 e^x - x - 1, which gives y(0.3) = 2 e^(0.3) - 1.3 approximately 2(1.34986) - 1.3 approximately 1.400. Our estimate 1.362 is close but low, an error of about 0.038.
Where did that exact solution come from? Module 2: the equation rearranges to y' - y = x, linear with P = -1, and the integrating factor e^(-x) plus one integration by parts delivers y = C e^x - x - 1, with y(0) = 1 forcing C = 2.
Verify it the Module 1 way: y' = 2 e^x - 1, and x + y = x + 2 e^x - x - 1 = 2 e^x - 1. The two sides agree, so the benchmark is trustworthy, and the course has just used its first, second, and last lessons in a single paragraph.
Why is the estimate low rather than high? Each step uses the slope at its left end, but this solution's slope grows along every step, so each straight segment undershoots the curve's climb. Underestimation is the systematic signature of Euler's method on convex, steepening solutions; on decaying solutions the bias runs the other way. The error is not random noise, it is geometry.
Halving the step, watching the error
Run the same problem with h = 0.05, six steps instead of three. The arithmetic is identical in spirit, and the sequence of heights is 1.05, 1.105, 1.16525, 1.23101, 1.30256, and finally y(0.3) approximately 1.380. The error shrinks to 1.400 - 1.380 = 0.020, compared with 0.038 before. Halving the step roughly halved the error, a clean experimental confirmation of the claim below that Euler's method is first-order accurate.
The accounting behind that is worth one paragraph. The local error of a single step, the gap between the tangent segment and the true curve, is proportional to h^2 (it is the quadratic remainder of a tangent-line approximation). But reaching a fixed destination takes 1/h steps, and the small errors accumulate: total error is roughly h^2 times 1/h, which is proportional to h. First order in h, exactly as the experiment showed.
Key idea: per-step error scales like h^2, step count like 1/h, so global error scales like h. Halve the step, halve the error, double the work.
Step size and error
Euler's method is only approximate because it assumes the slope stays constant across each whole step, when in reality the slope changes continuously. Two consequences follow:
- Smaller
his more accurate. Halving the step size roughly halves the error of Euler's method, at the cost of twice as many steps. Euler's method is called first-order accurate for this reason. - Error accumulates. Each step's small error carries into the next, so estimates drift over long intervals.
There is also a hazard beyond inaccuracy: instability. Apply Euler to the decay equation y' = -2y, whose true solutions die smoothly toward zero. Each step multiplies y by (1 - 2h). With h = 0.1 that factor is 0.8, a sensible decay. With h = 1.5 the factor is -2: the numerical solution flips sign every step and doubles in size, a violent oscillation the true solution never performs. Too large a step does not merely blur the answer; it can invent behavior. Practical solvers choose h small enough for both accuracy and stability, and often adjust it on the fly.
More refined schemes, such as the improved Euler (Heun) method and the widely used Runge-Kutta methods, reduce error dramatically by sampling the slope at several points within each step before committing. But every one of them rests on the same foundation you just used: read the slope from the equation, take a controlled step, and repeat. That single idea is how computers solve the differential equations that no formula can.
Where people get stuck
Using the new point's slope. The update uses f at the point you are standing on, (x_n, y_n), not at the destination. Schemes that peek ahead exist (that is exactly what improved Euler does), but plain Euler reads the field before stepping, never after.
Updating one variable and not the other. Each row advances both x (by h) and y (by h f). Forgetting the x update recycles the old slope forever; forgetting the y update walks along a horizontal line.
Confusing y_n with the true value. The quantity y_3 = 1.362 is an approximation to y(0.3), not the thing itself. Keeping the notation straight keeps the error discussion honest.
Rounding inside the table. Carry at least three or four decimals through every row and round only the final report. Each row feeds the next, so early rounding compounds exactly like the method's own error.
Trusting a big step. If halving h visibly changes the answer, the step was too big to trust. Agreement under refinement is the numerical analyst's version of checking by substitution.
Try it
Use Euler's method with h = 0.1 to estimate y(0.2) for y' = x - y, y(0) = 1, then compare with the exact solution y = x - 1 + 2 e^(-x).
Worked answer, row by row. Step 1: at (0, 1) the slope is 0 - 1 = -1, so y_1 = 1 + 0.1(-1) = 0.900 at x = 0.1. Step 2: at (0.1, 0.900) the slope is 0.1 - 0.900 = -0.800, so y_2 = 0.900 + 0.1(-0.800) = 0.820 at x = 0.2. Euler's estimate: y(0.2) approximately 0.820.
The benchmark: first confirm the exact solution the honest way. Its derivative is 1 - 2 e^(-x), and x - y = x - (x - 1 + 2 e^(-x)) = 1 - 2 e^(-x); both sides match, and y(0) = -1 + 2 = 1.
Evaluating, y(0.2) = 0.2 - 1 + 2 e^(-0.2) approximately -0.8 + 2(0.8187) approximately 0.837. The estimate 0.820 runs low by about 0.017, and one halving of h would cut that error roughly in half. If your two rows and your comparison match these, you can hand a differential equation to a computer and know exactly what it will do with it.
Recap
Euler's method turns an initial value problem into arithmetic: read the slope f(x_n, y_n), step to y_(n+1) = y_n + h f(x_n, y_n), advance x by h, repeat. The polygon it traces hugs the true curve with a global error proportional to h, because per-step tangent errors of size h^2 accumulate over 1/h steps; halving the step halves the error, and oversized steps risk outright instability. Refined methods sample the slope more cleverly, but all of scientific computing walks the same slope field.
And with that, the course's promise is complete. You can translate change into equations, solve the solvable ones exactly, first order by separation and integrating factors, second order through the characteristic equation and undetermined coefficients, or by Laplace transform, extend to coupled systems through eigenvalues, and approximate everything else numerically, with a clear understanding of what the approximation costs. The speedometer-to-odometer bridge is now yours in both directions.
Sources
- Lebl, J. (n.d.). Numerical methods: Euler's method. In Notes on Diffy Qs: Differential equations for engineers. jirka.org
- Herman, E., & Strang, G. (2016). Direction fields and numerical methods. In Calculus Volume 2. OpenStax. openstax.org
- Dawkins, P. (n.d.). Euler's Method. Paul's Online Math Notes, Lamar University. tutorial.math.lamar.edu
- Trench, W. F. (2013). Elementary differential equations with boundary value problems. Trinity University Digital Commons. digitalcommons.trinity.edu
- Mattuck, A., Miller, H., Orloff, J., & Lewis, J. (2010). 18.03 Differential equations [Course materials]. MIT OpenCourseWare. ocw.mit.edu
- Runge, C. (1895). Ueber die numerische Aufloesung von Differentialgleichungen. Mathematische Annalen, 46(2), 167-178. doi.org/10.1007/BF01446807
- O'Connor, J. J., & Robertson, E. F. (n.d.). Carl Runge. MacTutor History of Mathematics Archive, University of St Andrews. mathshistory.st-andrews.ac.uk
- Key terms
- Numerical method
- A procedure that approximates a solution as numbers when no exact formula is available.
- Euler's method
- The update y_(n+1) = y_n + h f(x_n, y_n) that steps along the tangent line.
- Step size
- The fixed increment h between successive x values; smaller h gives more accuracy.
- First-order accuracy
- Halving Euler's step size roughly halves its error.
- Accumulated error
- The buildup of small per-step errors over many steps of a numerical method.