Ordinary Differential Equations
§2 First-Order Equations
35 min read
First-order methods
A first-order ODE contains the first derivative , but no higher derivative such as . We usually write
where is the independent variable and is the function we want to find.
Don't start integrating straight away. First look for a form you recognize: can you separate the variables, make the left side a product derivative, or find a function that stays constant along solutions? No single method solves every first-order equation. These are the three forms we'll use:
| Form | Method |
|---|---|
| Separate the variables | |
| Use a linear integrating factor | |
| Test for exactness |
An equation can fit more than one row. If it's both separable and linear, for example, either method works. Use the one that makes the calculation simpler.
Separable equations
A first-order equation is separable when it can be rearranged so that every expression involving is on one side and every expression involving is on the other.
The usual form is
where depends only on and depends only on .
For example,
is separable because the right side factors into a -part and a -part. The equation
is not separable in this form because the right side is a sum, not such a product.
Check for equilibrium solutions first
To separate, we're about to divide by . We can't do that when the factor is zero. But a zero factor may give a perfectly valid solution of the original equation, so check it first.
Before dividing, solve
If makes , then the constant function has
This constant function is an equilibrium solution. The symbol is read “ star.”
Don't assume that every solution reaching this value must stay there. We need a uniqueness theorem to rule out a solution reaching it and leaving again.
Separating and integrating
When , divide by it and integrate both sides:
You may end up with and still mixed together. That's an implicit solution: the equation describes the function without solving for it explicitly. A curve can have more than one branch. Use a branch you can differentiate, on an interval where the original ODE and the division above both make sense.
Why the separation shortcut works
The notation
looks like we're treating as an ordinary fraction. It's a useful way to remember the steps, but the chain rule is what justifies them.
Let's give the two antiderivatives names. Choose and so that
Because depends on , the chain rule gives
The ODE says that this equals . Therefore,
A quantity with derivative zero is constant, so
This is the same implicit equation produced by separating and integrating.
Implicit solutions and level curves
We have found an expression that stays constant along each solution. Give that expression a name:
Read as “psi.” This is a potential function for the separated equation. The ODE tells us the slope. This function tells us something else: which value stays constant along a solution.
A curve on which has the same value everywhere is called a level curve. Each solution follows one of these curves. Choosing a different selects a different level.
Level curves and the selected solution
Example: circles as implicit solutions
Consider
Separate the variables and integrate:
Move the squared terms to the same side:
For a positive constant, this equation describes a circle centered at the origin. But the whole circle isn't a function of the horizontal coordinate. We'll need to choose a branch. Suppose we're given
Substituting and gives , so
Solving for produces two branches:
We need , so we choose the upper branch:
How far can we follow this solution? The maximal solution interval is the largest interval around the initial point where the formula still solves the original ODE. Here that's
The square root still gives a real number at . But it gives , and the original ODE divides by . So those endpoints aren't part of the solution interval.
Example: logistic growth
Let be the population at time . Its derivative tells us how fast the total population is changing.
A general population model can be written as
Here is the growth rate per individual, called the per-capita growth rate. Multiply it by the number of individuals to get the total rate of change.
Exponential growth assumes stays constant. That can work while there's plenty of food and space, but not when resources run short. To model that limit, use two constants:
- , the per-capita growth rate when the population is very small;
- , the carrying capacity, or the long-term population level the environment can sustain.
In terms of , the model should satisfy
A positive population should grow when and shrink when . We can get that behavior by making the per-capita rate fall along a straight line from to :
Checking the sign of shows how the population changes:
- If , then , so the population grows.
- If , then , so the population stays constant.
- If , then , so the population decreases.
The carrying capacity is an equilibrium, not a hard ceiling. A population can start above ; in that case the model predicts that it decreases toward .
Put this expression for into the population model. We get the logistic equation:
The equation is first order and separable. It is nonlinear because multiplying by produces an term.
Equilibria and direction
Equilibrium solutions occur where the rate of change is zero. Setting the right side of the logistic equation equal to zero gives
This yields two equilibrium populations:
Start at either equilibrium and the population stays there. Start at any other positive value and the sign of tells us it moves toward . Nearby populations move toward this equilibrium rather than away from it, so we call it a stable equilibrium.
Per-capita growth rate
Growth is positive below the carrying capacity K, zero at K, and negative above K.
Population trajectories
K is a stable equilibrium: every positive trajectory shown approaches the carrying capacity.
Solving the equation
We know where the population is heading. Now we want its value at any given time. Let with , where is the initial population.
The right side is a polynomial, so it's smooth and the uniqueness theorem applies. That means these solutions can't cross either equilibrium while they exist. We have and , so we can divide and separate:
The fraction on the left is easier to integrate if we split it into partial fractions:
Both fractions integrate to logarithms. Watch the sign of the second one: the derivative of with respect to is , so that integral needs a minus sign.
Integrate the right side too, then put the results together:
Exponentiate to remove the logarithm. We can include both the sign and the factor in one nonzero constant, :
To isolate , multiply both sides by :
Expand the right side, then collect the terms containing on the left:
Use to find :
Put back in and solve for the population:
We divided by to get here, so that calculation didn't cover the two equilibria. Keep them with the answer:
Now check the formula against what we predicted from the signs:
- If , the population increases toward .
- If , it stays at .
- If , it decreases toward .
Linear equations
In a linear equation, the unknown and its first derivative appear to the first power. Their coefficients can depend on the independent variable, but not on the unknown function. You may be given an equation like
First divide every term by . Work on an interval where , so this division is allowed. You get
where
This is the standard form. The coefficient of must be before we find the integrating factor.
What the integrating factor does
The left side of the standard form is
We don't know the function in the second term yet, so we can't just integrate that term as if it were known. Instead, we'll try to turn the whole left side into a derivative we recognize.
Multiply every term by a function , read “mu of .” We want
to become the derivative of .
By the product rule,
The first terms already match. The second terms will match when
Now we have an equation for the multiplier itself, and it's separable. Divide by the nonzero multiplier, integrate, then exponentiate. One choice is
This is the integrating factor. We don't need in its exponent: that would just multiply by a nonzero constant, which cancels when we solve for .
With that choice of , the product rule lets us rewrite the multiplied equation as
Now integrate both sides and divide by :
You don't have to memorize this last formula. You can get it again by following the steps: multiply, use the product rule, integrate, then divide back.
Some WeBWorK questions use for the reciprocal of the integrating factor:
These aren't two different methods. You still multiply the equation by . The reciprocal appears when you solve for at the end. Check which one the question asks you to enter.
A reliable procedure
For a linear equation:
- Divide through so the coefficient of is .
- Identify and in .
- Find .
- Multiply every term by .
- Rewrite the left side as .
- Integrate both sides. This is where the constant appears.
- Divide by .
- Use the initial condition, if there is one, to find .
To check the answer, differentiate it and put it back into the original ODE.
Example: a variable coefficient
Consider
The equation is already in standard form, so
The integrating factor is
The expression is always positive, so there's no zero to avoid and no need to split into separate intervals. Multiply every term by :
The left side is now the derivative we wanted:
Integrating gives
so the general solution is
Different values of give different solutions. An initial condition chooses one of them.
For example, if , then
so and
If , then and
Example: an exponential input
Consider
Here , so
Multiply the whole equation by :
Integrate:
Dividing by gives
The first term gives one solution for this input. The term lets us adjust the starting value without changing the input. It solves the equation we get by replacing the right side with zero. That's called the homogeneous equation:
Example: falling object
Suppose an object falls with gravity pulling it down and air resistance opposing its motion. We'll take downward as positive and use:
- as the downward velocity at time ;
- as the object's mass;
- as gravitational acceleration;
- , read “gamma,” as the linear drag coefficient.
Gravity contributes . We're modeling drag as , so it always opposes the velocity. Newton's second law then gives
Divide by to get the acceleration:
For a downward-moving object, compare the two forces. If gravity is larger than drag, then and the object speeds up. If drag is larger, then and it slows down.
Terminal velocity
The velocity stops changing when the acceleration is zero (). Set the right side to zero:
which gives
where is the terminal velocity.
Factor out to write the equation using :
Now we can read off what happens:
- If , then , so the velocity increases.
- If , then , so the velocity decreases.
- If , then , so the velocity stays constant.
In all cases, the velocity moves toward .
Solving the equation
To solve for , write the differential equation in standard first-order linear form:
The integrating factor is
Multiply every term by . The left side is now a product derivative:
Integrating both sides gives
Let the initial velocity be . Put in to find the constant:
Multiply by and put in :
Read the answer as an equilibrium value plus a difference that changes with time:
- , which is the steady terminal velocity;
- the initial difference from terminal velocity, multiplied by a decaying exponential.
Because and , the exponential term decays:
As that difference tends to zero, the velocity approaches terminal velocity:
If the object is dropped from rest, setting simplifies the solution to
The velocity starts at zero and rises smoothly toward terminal velocity without exceeding it.
Velocity under linear drag
Example: mixing tank
A tank starts with gallons of well-stirred solution containing pounds of salt. Liquid flows in and out, carrying salt with it. We'll use:
- as the amount of salt, in pounds, after minutes;
- as both the inflow and outflow rate, in gallons per minute;
- lb/gal as the salt concentration of the incoming solution.
The same amount of liquid comes in as goes out, so the tank stays at gallons. To find how fast the salt amount changes, subtract what leaves from what enters:
The incoming salt rate is concentration times flow rate:
Stirring keeps the salt evenly mixed. That means the liquid leaving has the same concentration as the liquid still in the tank:
Thus the outgoing salt rate is
Subtracting the two rates gives the initial-value problem
Check the units: each term should be in pounds per minute. We're tracking how fast the amount of salt changes, not how fast the concentration changes.
Solving the equation
This is already in linear standard form. The derivative has coefficient one, and the salt amount appears to the first power. The integrating factor is
After multiplying the equation by , the left side becomes a product derivative:
Integrating both sides gives
Dividing by the integrating factor,
The initial condition determines the constant:
Therefore,
Does this equilibrium make sense? When the tank has the same concentration as the incoming liquid, salt comes in and goes out at equal rates. The amount in the tank must then be
For , the exponential factor tends to zero. If , the amount rises toward ; if , it falls toward ; and if , it stays there.
We can see the same behavior by tracking the difference from equilibrium instead of the total amount. Define . Then the model becomes
If the tank did not start at equilibrium, is the fraction of the initial gap left. If it did, the gap stays zero.
Stable salt equilibrium at 25 pounds
- Q(0) = 50 lb
- Q(0) = 25 lb
- Q(0) = 10 lb
Time to reach a target
Take lb and gal/min. Then
Being within of the -lb equilibrium means
The amount is falling toward equilibrium from above. It first gets close enough when , where is the time we're looking for. Solve for that time:
What if we want it to get that close within minutes? Now the time is known and the flow rate is what we need to find. At the smallest rate that works, it reaches the target just as the time runs out:
Therefore,
Any reaches the tolerance band no later than minutes.
Example: cooling
A hot object cools faster when the temperature difference is larger. As it gets closer to room temperature, that difference shrinks and cooling slows. Let be the object's temperature and the constant temperature of its surroundings. Newton's law of cooling models the rate as proportional to the temperature difference:
The minus sign makes the model move toward room temperature:
- If , then , so the object cools.
- If , then , so the object warms.
- If , then , so the temperature is at equilibrium.
We could use separation here, but the equation is linear too. To use that method, write it in standard form:
Its integrating factor is
Multiplying the equation by turns the left side into a product derivative:
Integrating and then dividing by gives
If , then . Hence
For comparison, separation gives
so
We divided by the temperature difference, so this calculation leaves out the case where the object is already at room temperature. Keep that constant solution too. For the other solutions, exponentiate and include the sign in the arbitrary constant:
It's the difference that shrinks exponentially. Under this model, gets closer to but doesn't cross it.
Cooling coffee
A cup of coffee is poured at into a room at . After one minute, its temperature is . The model is
Using ,
so
To find when the coffee reaches , solve
This gives
The falling-object, mixing, and cooling solutions share a useful pattern:
Here is the rate at which the difference shrinks: respectively , , and . This is a feature of these constant-coefficient models, not the form of every linear solution.
Exact and non-exact equations
For an exact equation, we're looking for a function that stays constant along the solution curve. We don't know the function yet, but the equation gives us its two partial derivatives. We'll use those to find it. First, here's what a partial derivative means.
Partial derivatives
A function such as depends on two variables. The notation
means: differentiate with respect to while treating as a constant. Similarly,
means: differentiate with respect to while treating as a constant.
For example, let
Holding fixed gives
while holding fixed gives
In a partial derivative, we hold one input fixed and change the other. When we follow a curve, both inputs can change. That's why we need both partial derivatives in the chain rule.
Exact equations
Write a first-order equation as
The equation is exact when there is a function such that
Why does this help? Along a solution , the chain rule gives
If and , then the differential equation says
Therefore stays constant along each solution:
A quick example shows where this form comes from. Start with
Its partial derivatives are
Setting produces
We built this equation by differentiating a function, so we already know the function it came from. Its solutions satisfy
The exactness test
Usually we have and , but we don't know . Before trying to find it, check what would have to be true. If and , differentiating once more gives
For a sufficiently smooth function, the mixed partial derivatives are equal. That leads to the test
This does not mean that and must be equal. It means that their cross-derivatives must agree.
Suppose , , , and are continuous on a rectangular region. Then the equation is exact on that region if and only if throughout the region.
Solving an exact equation
Once the test passes, we can work backward to find . Integrating one coefficient gets us part of the function. The other coefficient tells us what's missing:
- Integrate with respect to .
- Add an unknown function , not just a constant, because every function of acts like a constant when differentiating with respect to .
- Differentiate the result with respect to .
- Set that derivative equal to and solve for .
- Integrate to find , then set the completed function equal to .
Consider
Here
The cross-derivatives agree:
Integrating with respect to gives
Differentiate this with respect to :
We need this to equal , so . That makes the missing function a constant, which we can include in . The solution is
You can start with the other coefficient instead. Integrate with respect to , add an unknown function of , and use to find it. Choose whichever integral looks easier.
Example: trigonometric and exponential terms
Consider the exact differential equation
Here
so the equation is exact. Integrating with respect to gives
Differentiate with respect to and match the result with :
Thus and . The implicit solution is
Non-exact equations
If , the equation is not exact. We can sometimes multiply the entire equation by an integrating factor so that the new coefficients and pass the exactness test.
For a general factor , exactness requires
If the multiplier depends on both variables, we'll have two new partial derivatives to deal with. So first try something simpler: a multiplier that depends on only one variable.
Suppose . We want
Because depends only on , its derivative with respect to is zero. Apply the product rule:
Move the term to the left and divide by wherever those quantities are nonzero:
The left side only depends on the chosen variable. If the right side still depends on both variables after simplifying, this choice of multiplier can't work.
If
depends only on , call it . Then
For a factor depending only on , set . The product rule gives
Set these expressions equal and divide by , where neither factor is zero:
Therefore, if
depends only on , call it . Then
The subtraction goes the other way because the extra product-rule term is now on the other side. If you forget the sign, you don't have to guess: write the exactness condition and use the product rule again.
Example: making a non-exact equation exact
Try this equation:
Identify
The cross-derivatives are
They are not equal, so the equation is not exact. Test for an integrating factor depending only on :
On a region where the cancelled factors and are nonzero, the result depends only on . Therefore,
Multiplying the factor by a nonzero constant doesn't change the solutions of the transformed equation. So on an interval that doesn't cross , we can choose
Multiply every term in the original equation by :
The new coefficients satisfy
so the transformed equation is exact.
The ratio is undefined at , because the factor we cancelled is zero there. But look at the exactness check we just did: it still works on that line. So the integrating factor extends across . We still can't cross when treating the equations as equivalent, because that's where the multiplier itself is zero.
Now integrate the new with respect to :
Then
Matching this with the new gives . The implicit solution is
Choosing a method
- Can the right side factor into a -part and a -part? Try separation.
- Can the equation be written as ? Use a linear integrating factor.
- Can it be written as ? Check whether .
- If it is not exact, test whether one of the one-variable integrating-factor ratios applies.
- Keep any equilibrium solutions lost by division, and state the interval on which the final formula satisfies the original equation.
Solution intervals and uniqueness
Finding a formula is only part of solving an initial-value problem. We also need to know whether a solution exists through the starting point, whether that solution is the only one, and how far in time it can continue.
Picard's local existence and uniqueness theorem
Start with
Choose finite numbers . They define an open rectangle around the initial point:
The number is the horizontal half-width in the -direction. The number is the vertical half-height in the -direction.
Suppose and its partial derivative
are continuous throughout . Picard's theorem (also called the Picard–Lindelöf theorem) says that there is some number satisfying
such that the IVP has exactly one solution on . Its graph stays inside the rectangle on that local interval.
What the local theorem guarantees
The number may be smaller than or equal to . Being nonlinear does not force strict inequality. More importantly, is an interval on which the theorem guarantees a solution; it is not automatically the largest interval on which that solution exists.
The hypotheses also tell us what each condition is doing:
- Continuity of is enough to guarantee at least one local solution.
- Continuity of is a convenient sufficient condition for local uniqueness because it controls how sharply can change in the -direction.
These are sufficient conditions, not a two-way test. If one fails, the theorem stops giving a conclusion. The IVP could still be unique, or it could have several solutions.
Example: choosing a Picard rectangle
Consider
Here
Both functions are continuous wherever . There is no additional restriction on . Since the initial time is , we can take
for any finite . The horizontal labels are and , with ; measures the vertical distance from . The singular time is on the boundary and is not part of this open rectangle.
Continuity actually holds on the whole unbounded strip . That explains why there is no natural upper limit on , but the rectangle in the theorem still uses any finite rather than writing .
Choosing a rectangle that avoids the singularity
Picard's theorem now gives a unique solution on some with . It does not tell us the exact value of , find the solution formula, or identify the maximal solution interval.
Why the uniqueness hypothesis matters
Consider
For real , interpret the fractional power using the real cube root:
This matters when . With this convention, the constant function
is one solution because and . Meanwhile,
is another. Check the second one directly in the original equation:
The two distinct solution curves pass through the same initial point, so uniqueness fails.
The same calculation works for negative : the real cube root of is , which is negative, and squaring it gives .
Separating this equation divides by , so that calculation is not valid at and loses the zero solution. Any nonzero candidate found that way must be checked in the original ODE, as we just did. There are even solutions that remain at zero for a while and then follow a shifted cubic, so one initial value does not select only one curve.
The right side is continuous, but for ,
which is undefined at . Thus is not continuous on any rectangle around . That failure does not by itself prove nonuniqueness. The two different solutions verified above are what prove it. They do not contradict Picard's theorem because its uniqueness hypothesis is missing.
Local intervals, maximal intervals, and finite-time blowup
The interval supplied by a local theorem and the maximal solution interval are different ideas:
- A local interval such as is a neighborhood on which existence and uniqueness are guaranteed.
- The maximal interval is the largest connected interval containing the initial time on which that particular solution can satisfy the ODE.
A maximal interval need not be symmetric about the initial time. The next example shows why.
Consider
Here and are continuous everywhere, so Picard's local existence and uniqueness hypotheses hold near every point. For this positive initial value, separation is valid along the solution:
Integrating gives
At , the initial condition gives . Put that back in and solve for :
The denominator becomes zero at , and
Therefore the maximal interval containing the initial time is
The largest symmetric interval about inside this domain is only
That symmetric interval is still not maximal: the solution continues indefinitely to the left. This is why the symmetric in the local theorem should not be confused with the full solution interval.
A smooth equation can still blow up in finite time
This is finite-time blowup. It does not contradict Picard's theorem: the theorem gives a unique solution locally, but it does not say that a nonlinear solution must remain finite for all time. By contrast, a solution of stays finite at every finite time and grows without bound only as .
Linear equations have a stronger interval result
For the linear IVP
Suppose and are continuous on an open interval and . Then there is exactly one solution on that same interval containing , not merely on a possibly smaller neighborhood.
The integrating-factor formula explains why. Define
Then the unique solution is
Continuity makes these integrals meaningful for every , so the solution cannot blow up at an interior point of . The phrase same interval does not mean all of : the guarantee ends where a coefficient stops being continuous. A particular problem might continue farther, but this theorem alone does not say so.
Example: find the interval without solving
Consider
The coefficient and forcing term are
The function is discontinuous at , while is undefined at . Their common continuity set is split into three intervals:
The initial time lies in only one of them, so the theorem gives a unique solution on
Intersect the coefficient intervals, then keep the piece containing the initial time
No explicit solution is needed. For this question, finding the common continuity interval that contains the initial time is the whole job.
0 reads
Last edited