evan's notes
cal 3discreteodeenv systems
中文

On this page

  • First-order methods
  • Separable equations
  • Check for equilibrium solutions first
  • Separating and integrating
  • Why the separation shortcut works
  • Implicit solutions and level curves
  • Example: logistic growth
  • Linear equations
  • What the integrating factor does
  • A reliable procedure
  • Example: a variable coefficient
  • Example: an exponential input
  • Example: falling object
  • Example: mixing tank
  • Example: cooling
  • Exact and non-exact equations
  • Partial derivatives
  • Exact equations
  • The exactness test
  • Solving an exact equation
  • Example: trigonometric and exponential terms
  • Non-exact equations
  • Example: making a non-exact equation exact
  • Choosing a method
  • Solution intervals and uniqueness
  • Picard's local existence and uniqueness theorem
  • Example: choosing a Picard rectangle
  • Why the uniqueness hypothesis matters
  • Local intervals, maximal intervals, and finite-time blowup
  • Linear equations have a stronger interval result
  • Example: find the interval without solving

Ordinary Differential Equations

§2 First-Order Equations

Evan Luo · Sep 4, 2026

Ordinary Differential Equations

§2 First-Order Equations

Evan LuoSep 4, 2026

35 min read

First-order methods

A first-order ODE contains the first derivative y′y'y′, but no higher derivative such as y′′y''y′′. We usually write

y′=dydt=f(t,y),y'=\frac{dy}{dt}=f(t,y), y′=dtdy​=f(t,y),

where ttt is the independent variable and y=y(t)y=y(t)y=y(t) 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:

FormMethod
y′=f1(t)f2(y)y'=f_1(t)f_2(y)y′=f1​(t)f2​(y)Separate the variables
y′+P(t)y=g(t)y'+P(t)y=g(t)y′+P(t)y=g(t)Use a linear integrating factor
M(x,y)+N(x,y)y′=0M(x,y)+N(x,y)y'=0M(x,y)+N(x,y)y′=0Test 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 yyy is on one side and every expression involving ttt is on the other.

The usual form is

dydt=f1(t)f2(y),\frac{dy}{dt}=f_1(t)f_2(y), dtdy​=f1​(t)f2​(y),

where f1f_1f1​ depends only on ttt and f2f_2f2​ depends only on yyy.

For example,

y′=et+y=eteyy'=e^{t+y}=e^t e^y y′=et+y=etey

is separable because the right side factors into a ttt-part and a yyy-part. The equation

y′=t2+y2y'=t^2+y^2 y′=t2+y2

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 f2(y)f_2(y)f2​(y). 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

f2(y)=0.f_2(y)=0. f2​(y)=0.

If y=y∗y=y_*y=y∗​ makes f2(y∗)=0f_2(y_*)=0f2​(y∗​)=0, then the constant function y(t)=y∗y(t)=y_*y(t)=y∗​ has

y′(t)=0=f1(t)f2(y∗).y'(t)=0=f_1(t)f_2(y_*). y′(t)=0=f1​(t)f2​(y∗​).

This constant function is an equilibrium solution. The symbol y∗y_*y∗​ is read “yyy 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 f2(y)≠0f_2(y)\ne0f2​(y)=0, divide by it and integrate both sides:

∫1f2(y) dy=∫f1(t) dt+C.\boxed{ \int\frac{1}{f_2(y)}\,dy = \int f_1(t)\,dt+C. } ∫f2​(y)1​dy=∫f1​(t)dt+C.​

You may end up with yyy and ttt 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

dyf2(y)=f1(t) dt\frac{dy}{f_2(y)}=f_1(t)\,dt f2​(y)dy​=f1​(t)dt

looks like we're treating dy/dtdy/dtdy/dt 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 FFF and GGG so that

F′(y)=1f2(y),G′(t)=f1(t).F'(y)=\frac{1}{f_2(y)}, \qquad G'(t)=f_1(t). F′(y)=f2​(y)1​,G′(t)=f1​(t).

Because yyy depends on ttt, the chain rule gives

ddtF(y(t))=F′(y)y′=y′f2(y).\frac{d}{dt}F(y(t)) =F'(y)y' =\frac{y'}{f_2(y)}. dtd​F(y(t))=F′(y)y′=f2​(y)y′​.

The ODE says that this equals f1(t)=G′(t)f_1(t)=G'(t)f1​(t)=G′(t). Therefore,

ddt(F(y(t))−G(t))=0.\frac{d}{dt}\bigl(F(y(t))-G(t)\bigr)=0. dtd​(F(y(t))−G(t))=0.

A quantity with derivative zero is constant, so

F(y)−G(t)=C.\boxed{F(y)-G(t)=C}. F(y)−G(t)=C​.

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:

ψ(t,y)=F(y)−G(t),\psi(t,y)=F(y)-G(t), ψ(t,y)=F(y)−G(t),

Read ψ\psiψ 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.

ψ(t,y)=C.\psi(t,y)=C. ψ(t,y)=C.

A curve on which ψ\psiψ has the same value everywhere is called a level curve. Each solution follows one of these curves. Choosing a different CCC selects a different level.

Level curves and the selected solution

Concentric level curvesThree circular level curves of psi equal to one half x squared plus one half y squared. The upper branch of the unit circle is highlighted because it contains the initial point zero comma one.C = 1/8C = 1/2C = 9/8(0, 1)xy
Every value of C gives a circle. The initial condition y(0) = 1 picks the upper branch of the circle C = 1/2.

Example: circles as implicit solutions

Consider

dydx=−xy.\frac{dy}{dx}=-\frac{x}{y}. dxdy​=−yx​.

Separate the variables and integrate:

y dy=−x dx,y22=−x22+C.\begin{aligned} y\,dy&=-x\,dx,\\ \frac{y^2}{2}&=-\frac{x^2}{2}+C. \end{aligned} ydy2y2​​=−xdx,=−2x2​+C.​

Move the squared terms to the same side:

x22+y22=C.\boxed{\frac{x^2}{2}+\frac{y^2}{2}=C}. 2x2​+2y2​=C​.

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

y(0)=1.y(0)=1. y(0)=1.

Substituting x=0x=0x=0 and y=1y=1y=1 gives C=1/2C=1/2C=1/2, so

x2+y2=1.x^2+y^2=1. x2+y2=1.

Solving for yyy produces two branches:

y=±1−x2.y=\pm\sqrt{1-x^2}. y=±1−x2​.

We need y(0)=1y(0)=1y(0)=1, so we choose the upper branch:

y(x)=1−x2.\boxed{y(x)=\sqrt{1-x^2}}. y(x)=1−x2​​.

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

−1<x<1.-1<x<1. −1<x<1.

The square root still gives a real number at x=±1x=\pm1x=±1. But it gives y=0y=0y=0, and the original ODE divides by yyy. So those endpoints aren't part of the solution interval.

Example: logistic growth

Let N(t)N(t)N(t) be the population at time ttt. Its derivative N′(t)N'(t)N′(t) tells us how fast the total population is changing.

A general population model can be written as

dNdt=R(N)N.\frac{dN}{dt}=R(N)N. dtdN​=R(N)N.

Here R(N)R(N)R(N) is the growth rate per individual, called the per-capita growth rate. Multiply it by the number of individuals NNN to get the total rate of change.

Exponential growth assumes R(N)R(N)R(N) 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:

  • r>0r>0r>0, the per-capita growth rate when the population is very small;
  • K>0K>0K>0, the carrying capacity, or the long-term population level the environment can sustain.

In terms of R(N)R(N)R(N), the model should satisfy

R(0)=r>0,R(K)=0.R(0)=r>0, \qquad R(K)=0. R(0)=r>0,R(K)=0.

A positive population should grow when N<KN<KN<K and shrink when N>KN>KN>K. We can get that behavior by making the per-capita rate fall along a straight line from rrr to 000:

R(N)=r(1−NK)=rK(K−N).R(N)=r\left(1-\frac{N}{K}\right) =\frac{r}{K}(K-N). R(N)=r(1−KN​)=Kr​(K−N).

Checking the sign of K−NK-NK−N shows how the population changes:

  • If 0<N<K0<N<K0<N<K, then K−N>0K-N>0K−N>0, so the population grows.
  • If N=KN=KN=K, then K−N=0K-N=0K−N=0, so the population stays constant.
  • If N>KN>KN>K, then K−N<0K-N<0K−N<0, so the population decreases.

The carrying capacity is an equilibrium, not a hard ceiling. A population can start above KKK; in that case the model predicts that it decreases toward KKK.

Put this expression for R(N)R(N)R(N) into the population model. We get the logistic equation:

dNdt=rK(K−N)N.\boxed{\frac{dN}{dt}=\frac{r}{K}(K-N)N}. dtdN​=Kr​(K−N)N​.

The equation is first order and separable. It is nonlinear because multiplying (K−N)(K-N)(K−N) by NNN produces an N2N^2N2 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

rK(K−N)N=0.\frac{r}{K}(K-N)N=0. Kr​(K−N)N=0.

This yields two equilibrium populations:

N=0andN=K.N=0 \qquad\text{and}\qquad N=K. N=0andN=K.

Start at either equilibrium and the population stays there. Start at any other positive value and the sign of N′N'N′ tells us it moves toward KKK. Nearby populations move toward this equilibrium rather than away from it, so we call it a stable equilibrium.

Per-capita growth rate

Logistic per-capita growth rateR of N decreases linearly from r at population zero, crosses zero at carrying capacity K, and is negative above K.rKNR(N)

Growth is positive below the carrying capacity K, zero at K, and negative above K.

Population trajectories

Solutions of the logistic equationPositive populations below K rise toward K. Populations above K fall toward K. A population equal to K stays constant.N₀ < KN₀ > KKtN(t)

K is a stable equilibrium: every positive trajectory shown approaches the carrying capacity.

Two D3 graphs showing how the logistic model changes sign at carrying capacity K and how positive solutions approach K.

Solving the equation

We know where the population is heading. Now we want its value at any given time. Let N(0)=N0N(0)=N_0N(0)=N0​ with N0∉{0,K}N_0\notin\{0,K\}N0​∈/{0,K}, where N0N_0N0​ 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 N≠0N\ne0N=0 and N≠KN\ne KN=K, so we can divide and separate:

KN(K−N) dN=r dt.\frac{K}{N(K-N)}\,dN=r\,dt. N(K−N)K​dN=rdt.

The fraction on the left is easier to integrate if we split it into partial fractions:

KN(K−N)=1N+1K−N.\frac{K}{N(K-N)} =\frac1N+\frac1{K-N}. N(K−N)K​=N1​+K−N1​.

Both fractions integrate to logarithms. Watch the sign of the second one: the derivative of K−NK-NK−N with respect to NNN is −1-1−1, so that integral needs a minus sign.

∫(1N+1K−N)dN=ln⁡∣N∣−ln⁡∣K−N∣=ln⁡∣NK−N∣.\begin{aligned} \int\left(\frac1N+\frac1{K-N}\right)dN &=\ln|N|-\ln|K-N|\\ &=\ln\left|\frac{N}{K-N}\right|. \end{aligned} ∫(N1​+K−N1​)dN​=ln∣N∣−ln∣K−N∣=ln​K−NN​​.​

Integrate the right side too, then put the results together:

ln⁡∣NK−N∣=rt+C.\ln\left|\frac{N}{K-N}\right|=rt+C. ln​K−NN​​=rt+C.

Exponentiate to remove the logarithm. We can include both the sign and the factor eCe^CeC in one nonzero constant, C1C_1C1​:

NK−N=C1ert.\frac{N}{K-N}=C_1e^{rt}. K−NN​=C1​ert.

To isolate NNN, multiply both sides by K−NK-NK−N:

N=C1ert(K−N).N=C_1e^{rt}(K-N). N=C1​ert(K−N).

Expand the right side, then collect the terms containing NNN on the left:

N(1+C1ert)=KC1ert.N(1+C_1e^{rt})=KC_1e^{rt}. N(1+C1​ert)=KC1​ert.

Use N(0)=N0N(0)=N_0N(0)=N0​ to find C1C_1C1​:

C1=N0K−N0.C_1=\frac{N_0}{K-N_0}. C1​=K−N0​N0​​.

Put C1C_1C1​ back in and solve for the population:

N(t)=KN0N0+(K−N0)e−rt.\boxed{ N(t)=\frac{KN_0}{N_0+(K-N_0)e^{-rt}} }. N(t)=N0​+(K−N0​)e−rtKN0​​​.

We divided by N(K−N)N(K-N)N(K−N) to get here, so that calculation didn't cover the two equilibria. Keep them with the answer:

N(t)≡0andN(t)≡K.N(t)\equiv0 \qquad\text{and}\qquad N(t)\equiv K. N(t)≡0andN(t)≡K.

Now check the formula against what we predicted from the signs:

  • If 0<N0<K0<N_0<K0<N0​<K, the population increases toward KKK.
  • If N0=KN_0=KN0​=K, it stays at KKK.
  • If N0>KN_0>KN0​>K, it decreases toward KKK.

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

a0(t)y′(t)+a1(t)y(t)=h(t).a_0(t)y'(t)+a_1(t)y(t)=h(t). a0​(t)y′(t)+a1​(t)y(t)=h(t).

First divide every term by a0(t)a_0(t)a0​(t). Work on an interval where a0(t)≠0a_0(t)\ne0a0​(t)=0, so this division is allowed. You get

y′(t)+P(t)y(t)=g(t),y'(t)+P(t)y(t)=g(t), y′(t)+P(t)y(t)=g(t),

where

P(t)=a1(t)a0(t),g(t)=h(t)a0(t).P(t)=\frac{a_1(t)}{a_0(t)}, \qquad g(t)=\frac{h(t)}{a_0(t)}. P(t)=a0​(t)a1​(t)​,g(t)=a0​(t)h(t)​.

This is the standard form. The coefficient of y′y'y′ must be 111 before we find the integrating factor.

What the integrating factor does

The left side of the standard form is

y′+P(t)y.y'+P(t)y. y′+P(t)y.

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 μ(t)\mu(t)μ(t), read “mu of ttt.” We want

μy′+μPy\mu y'+\mu P y μy′+μPy

to become the derivative of μy\mu yμy.

By the product rule,

ddt(μy)=μy′+μ′y.\frac{d}{dt}(\mu y)=\mu y'+\mu' y. dtd​(μy)=μy′+μ′y.

The first terms already match. The second terms will match when

μ′=Pμ.\mu'=P\mu. μ′=Pμ.

Now we have an equation for the multiplier itself, and it's separable. Divide by the nonzero multiplier, integrate, then exponentiate. One choice is

μ(t)=e∫P(t) dt.\boxed{\mu(t)=e^{\int P(t)\,dt}}. μ(t)=e∫P(t)dt​.

This is the integrating factor. We don't need +C+C+C in its exponent: that would just multiply μ\muμ by a nonzero constant, which cancels when we solve for yyy.

With that choice of μ\muμ, the product rule lets us rewrite the multiplied equation as

ddt(μy)=μg.\frac{d}{dt}(\mu y)=\mu g. dtd​(μy)=μg.

Now integrate both sides and divide by μ\muμ:

y(t)=1μ(t)(∫μ(t)g(t) dt+C).\boxed{ y(t)=\frac{1}{\mu(t)} \left(\int \mu(t)g(t)\,dt+C\right). } y(t)=μ(t)1​(∫μ(t)g(t)dt+C).​

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 u(t)u(t)u(t) for the reciprocal of the integrating factor:

u(t)=1μ(t).u(t)=\frac{1}{\mu(t)}. u(t)=μ(t)1​.

These aren't two different methods. You still multiply the equation by μ\muμ. The reciprocal uuu appears when you solve for yyy at the end. Check which one the question asks you to enter.

A reliable procedure

For a linear equation:

  1. Divide through so the coefficient of y′y'y′ is 111.
  2. Identify P(t)P(t)P(t) and g(t)g(t)g(t) in y′+P(t)y=g(t)y'+P(t)y=g(t)y′+P(t)y=g(t).
  3. Find μ(t)=e∫P(t) dt\mu(t)=e^{\int P(t)\,dt}μ(t)=e∫P(t)dt.
  4. Multiply every term by μ(t)\mu(t)μ(t).
  5. Rewrite the left side as (μy)′(\mu y)'(μy)′.
  6. Integrate both sides. This is where the constant CCC appears.
  7. Divide by μ(t)\mu(t)μ(t).
  8. Use the initial condition, if there is one, to find CCC.

To check the answer, differentiate it and put it back into the original ODE.

Example: a variable coefficient

Consider

y′+2t4+t2y=4t4+t2.y'+\frac{2t}{4+t^2}y=\frac{4t}{4+t^2}. y′+4+t22t​y=4+t24t​.

The equation is already in standard form, so

P(t)=2t4+t2.P(t)=\frac{2t}{4+t^2}. P(t)=4+t22t​.

The integrating factor is

μ(t)=e∫2t4+t2 dt=eln⁡(4+t2)=4+t2.\begin{aligned} \mu(t) &=e^{\int \frac{2t}{4+t^2}\,dt}\\ &=e^{\ln(4+t^2)}\\ &=4+t^2. \end{aligned} μ(t)​=e∫4+t22t​dt=eln(4+t2)=4+t2.​

The expression 4+t24+t^24+t2 is always positive, so there's no zero to avoid and no need to split into separate intervals. Multiply every term by 4+t24+t^24+t2:

(4+t2)y′+2ty=4t.(4+t^2)y'+2ty=4t. (4+t2)y′+2ty=4t.

The left side is now the derivative we wanted:

ddt((4+t2)y)=4t.\frac{d}{dt}\bigl((4+t^2)y\bigr)=4t. dtd​((4+t2)y)=4t.

Integrating gives

(4+t2)y=2t2+C,(4+t^2)y=2t^2+C, (4+t2)y=2t2+C,

so the general solution is

y(t)=2t2+C4+t2.\boxed{y(t)=\frac{2t^2+C}{4+t^2}}. y(t)=4+t22t2+C​​.

Different values of CCC give different solutions. An initial condition chooses one of them.

For example, if y(0)=0y(0)=0y(0)=0, then

0=C4,0=\frac{C}{4}, 0=4C​,

so C=0C=0C=0 and

y(t)=2t24+t2.y(t)=\frac{2t^2}{4+t^2}. y(t)=4+t22t2​.

If y(0)=1y(0)=1y(0)=1, then C=4C=4C=4 and

y(t)=2t2+44+t2.y(t)=\frac{2t^2+4}{4+t^2}. y(t)=4+t22t2+4​.

Example: an exponential input

Consider

y′+12y=12et/3.y'+\frac12y=\frac12e^{t/3}. y′+21​y=21​et/3.

Here P(t)=1/2P(t)=1/2P(t)=1/2, so

μ(t)=e∫1/2 dt=et/2.\mu(t)=e^{\int 1/2\,dt}=e^{t/2}. μ(t)=e∫1/2dt=et/2.

Multiply the whole equation by et/2e^{t/2}et/2:

ddt(et/2y)=12et/2et/3=12e5t/6.\frac{d}{dt}\left(e^{t/2}y\right) =\frac12e^{t/2}e^{t/3} =\frac12e^{5t/6}. dtd​(et/2y)=21​et/2et/3=21​e5t/6.

Integrate:

et/2y=12∫e5t/6 dt+C=35e5t/6+C.\begin{aligned} e^{t/2}y &=\frac12\int e^{5t/6}\,dt+C\\ &=\frac35e^{5t/6}+C. \end{aligned} et/2y​=21​∫e5t/6dt+C=53​e5t/6+C.​

Dividing by et/2e^{t/2}et/2 gives

y(t)=35et/3+Ce−t/2.\boxed{y(t)=\frac35e^{t/3}+Ce^{-t/2}}. y(t)=53​et/3+Ce−t/2​.

The first term gives one solution for this input. The term Ce−t/2Ce^{-t/2}Ce−t/2 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:

y′+12y=0.y'+\frac12y=0. y′+21​y=0.

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:

  • v(t)v(t)v(t) as the downward velocity at time ttt;
  • m>0m>0m>0 as the object's mass;
  • g>0g>0g>0 as gravitational acceleration;
  • γ>0\gamma>0γ>0, read “gamma,” as the linear drag coefficient.

Gravity contributes +mg+mg+mg. We're modeling drag as −γv-\gamma v−γv, so it always opposes the velocity. Newton's second law then gives

mv′(t)=mg−γv(t).mv'(t)=mg-\gamma v(t). mv′(t)=mg−γv(t).

Divide by mmm to get the acceleration:

v′(t)=g−γmv(t).\boxed{v'(t)=g-\frac{\gamma}{m}v(t)}. v′(t)=g−mγ​v(t)​.

For a downward-moving object, compare the two forces. If gravity is larger than drag, then v′>0v'>0v′>0 and the object speeds up. If drag is larger, then v′<0v'<0v′<0 and it slows down.

Terminal velocity

The velocity stops changing when the acceleration is zero (v′=0v'=0v′=0). Set the right side to zero:

0=g−γmv,0=g-\frac{\gamma}{m}v, 0=g−mγ​v,

which gives

vT=mgγ,\boxed{v_T=\frac{mg}{\gamma}}, vT​=γmg​​,

where vTv_TvT​ is the terminal velocity.

Factor out γm\frac{\gamma}{m}mγ​ to write the equation using vTv_TvT​:

v′=γm(vT−v).v'=\frac{\gamma}{m}(v_T-v). v′=mγ​(vT​−v).

Now we can read off what happens:

  • If v<vTv<v_Tv<vT​, then v′>0v'>0v′>0, so the velocity increases.
  • If v>vTv>v_Tv>vT​, then v′<0v'<0v′<0, so the velocity decreases.
  • If v=vTv=v_Tv=vT​, then v′=0v'=0v′=0, so the velocity stays constant.

In all cases, the velocity moves toward vTv_TvT​.

Solving the equation

To solve for v(t)v(t)v(t), write the differential equation in standard first-order linear form:

v′+γmv=g.v'+\frac{\gamma}{m}v=g. v′+mγ​v=g.

The integrating factor is

μ(t)=eγt/m.\mu(t)=e^{\gamma t/m}. μ(t)=eγt/m.

Multiply every term by μ(t)\mu(t)μ(t). The left side is now a product derivative:

ddt(eγt/mv(t))=geγt/m.\frac{d}{dt}\left(e^{\gamma t/m}v(t)\right) =ge^{\gamma t/m}. dtd​(eγt/mv(t))=geγt/m.

Integrating both sides gives

eγt/mv(t)=mgγeγt/m+C.e^{\gamma t/m}v(t) =\frac{mg}{\gamma}e^{\gamma t/m}+C. eγt/mv(t)=γmg​eγt/m+C.

Let the initial velocity be v(0)=v0v(0)=v_0v(0)=v0​. Put in t=0t=0t=0 to find the constant:

C=v0−mgγ.C=v_0-\frac{mg}{\gamma}. C=v0​−γmg​.

Multiply by e−γt/me^{-\gamma t/m}e−γt/m and put in CCC:

v(t)=mgγ+(v0−mgγ)e−γt/m.\boxed{ v(t)=\frac{mg}{\gamma} +\left(v_0-\frac{mg}{\gamma}\right)e^{-\gamma t/m} }. v(t)=γmg​+(v0​−γmg​)e−γt/m​.

Read the answer as an equilibrium value plus a difference that changes with time:

  • mg/γmg/\gammamg/γ, which is the steady terminal velocity;
  • the initial difference from terminal velocity, multiplied by a decaying exponential.

Because m>0m>0m>0 and γ>0\gamma>0γ>0, the exponential term decays:

e−γt/m⟶0as t→∞.e^{-\gamma t/m}\longrightarrow0 \qquad\text{as }t\to\infty. e−γt/m⟶0as t→∞.

As that difference tends to zero, the velocity approaches terminal velocity:

lim⁡t→∞v(t)=mgγ.\boxed{ \lim_{t\to\infty}v(t)=\frac{mg}{\gamma} }. t→∞lim​v(t)=γmg​​.

If the object is dropped from rest, setting v0=0v_0=0v0​=0 simplifies the solution to

v(t)=mgγ(1−e−γt/m).v(t)=\frac{mg}{\gamma} \left(1-e^{-\gamma t/m}\right). v(t)=γmg​(1−e−γt/m).

The velocity starts at zero and rises smoothly toward terminal velocity without exceeding it.

Velocity under linear drag

Falling-object velocity curvesVelocities above terminal velocity decrease toward it. Zero and negative initial velocities increase toward the same terminal value.mg/γterminal velocityv₀ above terminal velocitynegative v₀tv(t)
The exponential term decays, so every curve approaches the terminal velocity mg/γ.

Example: mixing tank

A tank starts with 100100100 gallons of well-stirred solution containing Q0Q_0Q0​ pounds of salt. Liquid flows in and out, carrying salt with it. We'll use:

  • Q(t)Q(t)Q(t) as the amount of salt, in pounds, after ttt minutes;
  • r>0r>0r>0 as both the inflow and outflow rate, in gallons per minute;
  • 14\frac1441​ 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 100100100 gallons. To find how fast the salt amount changes, subtract what leaves from what enters:

rate of change=rate in−rate out.\text{rate of change}=\text{rate in}-\text{rate out}. rate of change=rate in−rate out.

The incoming salt rate is concentration times flow rate:

(14lbgal)(rgalmin)=r4lbmin.\left(\frac14\frac{\mathrm{lb}}{\mathrm{gal}}\right) \left(r\frac{\mathrm{gal}}{\mathrm{min}}\right) =\frac r4\frac{\mathrm{lb}}{\mathrm{min}}. (41​gallb​)(rmingal​)=4r​minlb​.

Stirring keeps the salt evenly mixed. That means the liquid leaving has the same concentration as the liquid still in the tank:

Q(t)100lbgal.\frac{Q(t)}{100}\frac{\mathrm{lb}}{\mathrm{gal}}. 100Q(t)​gallb​.

Thus the outgoing salt rate is

(Q(t)100lbgal)(rgalmin)=r100Q(t)lbmin.\left(\frac{Q(t)}{100}\frac{\mathrm{lb}}{\mathrm{gal}}\right) \left(r\frac{\mathrm{gal}}{\mathrm{min}}\right) =\frac r{100}Q(t)\frac{\mathrm{lb}}{\mathrm{min}}. (100Q(t)​gallb​)(rmingal​)=100r​Q(t)minlb​.

Subtracting the two rates gives the initial-value problem

Q′+r100Q=r4,Q(0)=Q0.\boxed{ Q'+\frac r{100}Q=\frac r4, \qquad Q(0)=Q_0 }. Q′+100r​Q=4r​,Q(0)=Q0​​.

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

μ(t)=e∫r/100 dt=ert/100.\mu(t)=e^{\int r/100\,dt}=e^{rt/100}. μ(t)=e∫r/100dt=ert/100.

After multiplying the equation by μ(t)\mu(t)μ(t), the left side becomes a product derivative:

ddt(ert/100Q(t))=r4ert/100.\frac d{dt}\left(e^{rt/100}Q(t)\right) =\frac r4e^{rt/100}. dtd​(ert/100Q(t))=4r​ert/100.

Integrating both sides gives

ert/100Q(t)=r4∫ert/100 dt+C=25ert/100+C.\begin{aligned} e^{rt/100}Q(t) &=\frac r4\int e^{rt/100}\,dt+C\\ &=25e^{rt/100}+C. \end{aligned} ert/100Q(t)​=4r​∫ert/100dt+C=25ert/100+C.​

Dividing by the integrating factor,

Q(t)=25+Ce−rt/100.Q(t)=25+Ce^{-rt/100}. Q(t)=25+Ce−rt/100.

The initial condition determines the constant:

Q0=Q(0)=25+C,C=Q0−25.Q_0=Q(0)=25+C, \qquad C=Q_0-25. Q0​=Q(0)=25+C,C=Q0​−25.

Therefore,

Q(t)=25+(Q0−25)e−rt/100.\boxed{ Q(t)=25+(Q_0-25)e^{-rt/100} }. Q(t)=25+(Q0​−25)e−rt/100​.

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

100 gal(14lbgal)=25 lb.100\,\mathrm{gal}\left(\frac14\frac{\mathrm{lb}}{\mathrm{gal}}\right) =25\,\mathrm{lb}. 100gal(41​gallb​)=25lb.

For r>0r>0r>0, the exponential factor tends to zero. If Q0<25Q_0<25Q0​<25, the amount rises toward 252525; if Q0>25Q_0>25Q0​>25, it falls toward 252525; and if Q0=25Q_0=25Q0​=25, it stays there.

We can see the same behavior by tracking the difference from equilibrium instead of the total amount. Define E(t)=Q(t)−25E(t)=Q(t)-25E(t)=Q(t)−25. Then the model becomes

E′=−r100E,E(t)=E(0)e−rt/100.E'=-\frac{r}{100}E, \qquad E(t)=E(0)e^{-rt/100}. E′=−100r​E,E(t)=E(0)e−rt/100.

If the tank did not start at equilibrium, E(t)/E(0)=e−rt/100E(t)/E(0)=e^{-rt/100}E(t)/E(0)=e−rt/100 is the fraction of the initial gap left. If it did, the gap stays zero.

Stable salt equilibrium at 25 pounds

Stable salt equilibrium at 25 poundsFor a positive flow rate, solutions beginning with 10, 25, and 50 pounds of salt all approach the equilibrium Q of t equals 25 pounds. Solutions below the equilibrium rise, solutions above it fall, and the equilibrium solution stays constant.050100150200010202530405025 lb equilibriumt (min)Q(t) (lb)
  • Q(0) = 50 lb
  • Q(0) = 25 lb
  • Q(0) = 10 lb
The exponential term keeps the initial deviation's sign while making its size decay. A solution approaches 25 lb from its own side and never crosses the equilibrium.

Time to reach a target

Take Q0=50Q_0=50Q0​=50 lb and r=3r=3r=3 gal/min. Then

Q(t)=25+25e−3t/100.Q(t)=25+25e^{-3t/100}. Q(t)=25+25e−3t/100.

Being within 2%2\%2% of the 252525-lb equilibrium means

∣Q(t)−25∣≤0.02(25)=0.5.|Q(t)-25|\le0.02(25)=0.5. ∣Q(t)−25∣≤0.02(25)=0.5.

The amount is falling toward equilibrium from above. It first gets close enough when Q(T)=25.5Q(T)=25.5Q(T)=25.5, where TTT is the time we're looking for. Solve for that time:

25+25e−3T/100=25.5e−3T/100=150T=1003ln⁡50≈130.4 min.\begin{aligned} 25+25e^{-3T/100}&=25.5\\ e^{-3T/100}&=\frac1{50}\\ T&=\frac{100}{3}\ln50\\ &\approx130.4\ \mathrm{min}. \end{aligned} 25+25e−3T/100e−3T/100T​=25.5=501​=3100​ln50≈130.4 min.​

What if we want it to get that close within 454545 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:

25+25e−45r/100=25.5.25+25e^{-45r/100}=25.5. 25+25e−45r/100=25.5.

Therefore,

rmin⁡=10045ln⁡50≈8.69 gal/min.\boxed{ r_{\min}=\frac{100}{45}\ln50 \approx8.69\ \mathrm{gal/min} }. rmin​=45100​ln50≈8.69 gal/min​.

Any r≥rmin⁡r\ge r_{\min}r≥rmin​ reaches the tolerance band no later than 454545 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 T(t)T(t)T(t) be the object's temperature and TroomT_{\mathrm{room}}Troom​ the constant temperature of its surroundings. Newton's law of cooling models the rate as proportional to the temperature difference:

dTdt=−k(T−Troom),k>0.\boxed{ \frac{dT}{dt}=-k\left(T-T_{\mathrm{room}}\right), \qquad k>0 }. dtdT​=−k(T−Troom​),k>0​.

The minus sign makes the model move toward room temperature:

  • If T>TroomT>T_{\mathrm{room}}T>Troom​, then T′<0T'<0T′<0, so the object cools.
  • If T<TroomT<T_{\mathrm{room}}T<Troom​, then T′>0T'>0T′>0, so the object warms.
  • If T=TroomT=T_{\mathrm{room}}T=Troom​, then T′=0T'=0T′=0, 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:

T′+kT=kTroom.T'+kT=kT_{\mathrm{room}}. T′+kT=kTroom​.

Its integrating factor is

μ(t)=ekt.\mu(t)=e^{kt}. μ(t)=ekt.

Multiplying the equation by ekte^{kt}ekt turns the left side into a product derivative:

ddt(ektT)=kTroomekt.\frac{d}{dt}\left(e^{kt}T\right) =kT_{\mathrm{room}}e^{kt}. dtd​(ektT)=kTroom​ekt.

Integrating and then dividing by ekte^{kt}ekt gives

T(t)=Troom+Ce−kt.T(t)=T_{\mathrm{room}}+Ce^{-kt}. T(t)=Troom​+Ce−kt.

If T(0)=T0T(0)=T_0T(0)=T0​, then C=T0−TroomC=T_0-T_{\mathrm{room}}C=T0​−Troom​. Hence

T(t)=Troom+(T0−Troom)e−kt.\boxed{ T(t)=T_{\mathrm{room}} +\left(T_0-T_{\mathrm{room}}\right)e^{-kt} }. T(t)=Troom​+(T0​−Troom​)e−kt​.

For comparison, separation gives

∫dTT−Troom=∫−k dt,\int\frac{dT}{T-T_{\mathrm{room}}} =\int-k\,dt, ∫T−Troom​dT​=∫−kdt,

so

ln⁡∣T−Troom∣=−kt+C.\ln|T-T_{\mathrm{room}}|=-kt+C. ln∣T−Troom​∣=−kt+C.

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:

T(t)=Troom+C1e−kt.T(t)=T_{\mathrm{room}}+C_1e^{-kt}. T(t)=Troom​+C1​e−kt.

It's the difference T(t)−TroomT(t)-T_{\mathrm{room}}T(t)−Troom​ that shrinks exponentially. Under this model, T(t)T(t)T(t) gets closer to TroomT_{\mathrm{room}}Troom​ but doesn't cross it.

Cooling coffee

A cup of coffee is poured at 90∘C90^\circ\mathrm C90∘C into a room at 20∘C20^\circ\mathrm C20∘C. After one minute, its temperature is 85∘C85^\circ\mathrm C85∘C. The model is

T(t)=20+70e−kt.T(t)=20+70e^{-kt}. T(t)=20+70e−kt.

Using T(1)=85T(1)=85T(1)=85,

85=20+70e−k,e−k=6570,85=20+70e^{-k}, \qquad e^{-k}=\frac{65}{70}, 85=20+70e−k,e−k=7065​,

so

k=−ln⁡(6570)≈0.0741 min−1.k=-\ln\left(\frac{65}{70}\right) \approx0.0741\ \mathrm{min}^{-1}. k=−ln(7065​)≈0.0741 min−1.

To find when the coffee reaches 60∘C60^\circ\mathrm C60∘C, solve

60=20+70e−kt.60=20+70e^{-kt}. 60=20+70e−kt.

This gives

t=−1kln⁡(4070)≈7.55 min.\boxed{ t=-\frac1k\ln\left(\frac{40}{70}\right) \approx7.55\ \mathrm{min} }. t=−k1​ln(7040​)≈7.55 min​.

The falling-object, mixing, and cooling solutions share a useful pattern:

current value=equilibrium+initial difference×e−λt.\text{current value} =\text{equilibrium} +\text{initial difference}\times e^{-\lambda t}. current value=equilibrium+initial difference×e−λt.

Here λ>0\lambda>0λ>0 is the rate at which the difference shrinks: respectively γ/m\gamma/mγ/m, r/100r/100r/100, and kkk. 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 ψ(x,y)\psi(x,y)ψ(x,y) depends on two variables. The notation

ψx=∂ψ∂x\psi_x=\frac{\partial\psi}{\partial x} ψx​=∂x∂ψ​

means: differentiate with respect to xxx while treating yyy as a constant. Similarly,

ψy=∂ψ∂y\psi_y=\frac{\partial\psi}{\partial y} ψy​=∂y∂ψ​

means: differentiate with respect to yyy while treating xxx as a constant.

For example, let

ψ(x,y)=3x2y+y3.\psi(x,y)=3x^2y+y^3. ψ(x,y)=3x2y+y3.

Holding yyy fixed gives

ψx=6xy,\psi_x=6xy, ψx​=6xy,

while holding xxx fixed gives

ψy=3x2+3y2.\psi_y=3x^2+3y^2. ψy​=3x2+3y2.

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

M(x,y)+N(x,y)dydx=0.M(x,y)+N(x,y)\frac{dy}{dx}=0. M(x,y)+N(x,y)dxdy​=0.

The equation is exact when there is a function ψ(x,y)\psi(x,y)ψ(x,y) such that

M=ψx,N=ψy.M=\psi_x, \qquad N=\psi_y. M=ψx​,N=ψy​.

Why does this help? Along a solution y=y(x)y=y(x)y=y(x), the chain rule gives

ddxψ(x,y(x))=ψx+ψydydx.\frac{d}{dx}\psi(x,y(x)) =\psi_x+\psi_y\frac{dy}{dx}. dxd​ψ(x,y(x))=ψx​+ψy​dxdy​.

If M=ψxM=\psi_xM=ψx​ and N=ψyN=\psi_yN=ψy​, then the differential equation says

ddxψ(x,y(x))=0.\frac{d}{dx}\psi(x,y(x))=0. dxd​ψ(x,y(x))=0.

Therefore ψ\psiψ stays constant along each solution:

ψ(x,y)=C.\boxed{\psi(x,y)=C}. ψ(x,y)=C​.

A quick example shows where this form comes from. Start with

ψ(x,y)=x2y+3x.\psi(x,y)=x^2y+3x. ψ(x,y)=x2y+3x.

Its partial derivatives are

ψx=2xy+3,ψy=x2.\psi_x=2xy+3, \qquad \psi_y=x^2. ψx​=2xy+3,ψy​=x2.

Setting dψ/dx=0d\psi/dx=0dψ/dx=0 produces

(2xy+3)+x2dydx=0.(2xy+3)+x^2\frac{dy}{dx}=0. (2xy+3)+x2dxdy​=0.

We built this equation by differentiating a function, so we already know the function it came from. Its solutions satisfy

x2y+3x=C.x^2y+3x=C. x2y+3x=C.

The exactness test

Usually we have MMM and NNN, but we don't know ψ\psiψ. Before trying to find it, check what would have to be true. If M=ψxM=\psi_xM=ψx​ and N=ψyN=\psi_yN=ψy​, differentiating once more gives

My=(ψx)y=ψxy,Nx=(ψy)x=ψyx.M_y=(\psi_x)_y=\psi_{xy}, \qquad N_x=(\psi_y)_x=\psi_{yx}. My​=(ψx​)y​=ψxy​,Nx​=(ψy​)x​=ψyx​.

For a sufficiently smooth function, the mixed partial derivatives are equal. That leads to the test

My=Nx.\boxed{M_y=N_x}. My​=Nx​​.

This does not mean that MMM and NNN must be equal. It means that their cross-derivatives must agree.

Suppose MMM, NNN, MyM_yMy​, and NxN_xNx​ are continuous on a rectangular region. Then the equation is exact on that region if and only if My=NxM_y=N_xMy​=Nx​ throughout the region.

Solving an exact equation

Once the test passes, we can work backward to find ψ\psiψ. Integrating one coefficient gets us part of the function. The other coefficient tells us what's missing:

  1. Integrate M=ψxM=\psi_xM=ψx​ with respect to xxx.
  2. Add an unknown function h(y)h(y)h(y), not just a constant, because every function of yyy acts like a constant when differentiating with respect to xxx.
  3. Differentiate the result with respect to yyy.
  4. Set that derivative equal to N=ψyN=\psi_yN=ψy​ and solve for h′(y)h'(y)h′(y).
  5. Integrate h′(y)h'(y)h′(y) to find h(y)h(y)h(y), then set the completed function ψ(x,y)\psi(x,y)ψ(x,y) equal to CCC.

Consider

2x+y2+2xydydx=0.2x+y^2+2xy\frac{dy}{dx}=0. 2x+y2+2xydxdy​=0.

Here

M=2x+y2,N=2xy.M=2x+y^2, \qquad N=2xy. M=2x+y2,N=2xy.

The cross-derivatives agree:

My=2y=Nx.M_y=2y=N_x. My​=2y=Nx​.

Integrating MMM with respect to xxx gives

ψ(x,y)=x2+xy2+h(y).\psi(x,y)=x^2+xy^2+h(y). ψ(x,y)=x2+xy2+h(y).

Differentiate this with respect to yyy:

ψy=2xy+h′(y).\psi_y=2xy+h'(y). ψy​=2xy+h′(y).

We need this to equal N=2xyN=2xyN=2xy, so h′(y)=0h'(y)=0h′(y)=0. That makes the missing function a constant, which we can include in CCC. The solution is

x2+xy2=C.\boxed{x^2+xy^2=C}. x2+xy2=C​.

You can start with the other coefficient instead. Integrate NNN with respect to yyy, add an unknown function of xxx, and use MMM to find it. Choose whichever integral looks easier.

Example: trigonometric and exponential terms

Consider the exact differential equation

(ycos⁡x+2xey)+(sin⁡x+x2ey−1)dydx=0.\left(y\cos x+2xe^y\right) +\left(\sin x+x^2e^y-1\right)\frac{dy}{dx}=0. (ycosx+2xey)+(sinx+x2ey−1)dxdy​=0.

Here

My=cos⁡x+2xey=Nx,M_y=\cos x+2xe^y=N_x, My​=cosx+2xey=Nx​,

so the equation is exact. Integrating MMM with respect to xxx gives

ψ(x,y)=ysin⁡x+x2ey+h(y).\psi(x,y)=y\sin x+x^2e^y+h(y). ψ(x,y)=ysinx+x2ey+h(y).

Differentiate with respect to yyy and match the result with NNN:

ψy=sin⁡x+x2ey+h′(y)=sin⁡x+x2ey−1.\psi_y=\sin x+x^2e^y+h'(y) =\sin x+x^2e^y-1. ψy​=sinx+x2ey+h′(y)=sinx+x2ey−1.

Thus h′(y)=−1h'(y)=-1h′(y)=−1 and h(y)=−yh(y)=-yh(y)=−y. The implicit solution is

ysin⁡x+x2ey−y=C.\boxed{y\sin x+x^2e^y-y=C}. ysinx+x2ey−y=C​.

Non-exact equations

If My≠NxM_y\ne N_xMy​=Nx​, the equation is not exact. We can sometimes multiply the entire equation by an integrating factor μ\muμ so that the new coefficients μM\mu MμM and μN\mu NμN pass the exactness test.

For a general factor μ(x,y)\mu(x,y)μ(x,y), exactness requires

∂(μM)∂y=∂(μN)∂x.\frac{\partial(\mu M)}{\partial y} = \frac{\partial(\mu N)}{\partial x}. ∂y∂(μM)​=∂x∂(μN)​.

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 μ=μ(x)\mu=\mu(x)μ=μ(x). We want

(μM)y=(μN)x.(\mu M)_y=(\mu N)_x. (μM)y​=(μN)x​.

Because μ\muμ depends only on xxx, its derivative with respect to yyy is zero. Apply the product rule:

μMy=μ′N+μNx.\mu M_y=\mu' N+\mu N_x. μMy​=μ′N+μNx​.

Move the μNx\mu N_xμNx​ term to the left and divide by μN\mu NμN wherever those quantities are nonzero:

μ′μ=My−NxN.\frac{\mu'}{\mu} = \frac{M_y-N_x}{N}. μμ′​=NMy​−Nx​​.

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

My−NxN\frac{M_y-N_x}{N} NMy​−Nx​​

depends only on xxx, call it F(x)F(x)F(x). Then

μ(x)=e∫F(x) dx.\boxed{\mu(x)=e^{\int F(x)\,dx}}. μ(x)=e∫F(x)dx​.

For a factor depending only on yyy, set μ=μ(y)\mu=\mu(y)μ=μ(y). The product rule gives

(μM)y=μ′M+μMy,(μN)x=μNx.(\mu M)_y=\mu' M+\mu M_y, \qquad (\mu N)_x=\mu N_x. (μM)y​=μ′M+μMy​,(μN)x​=μNx​.

Set these expressions equal and divide by μM\mu MμM, where neither factor is zero:

μ′μ=Nx−MyM.\frac{\mu'}{\mu} = \frac{N_x-M_y}{M}. μμ′​=MNx​−My​​.

Therefore, if

Nx−MyM\frac{N_x-M_y}{M} MNx​−My​​

depends only on yyy, call it G(y)G(y)G(y). Then

μ(y)=e∫G(y) dy.\boxed{\mu(y)=e^{\int G(y)\,dy}}. μ(y)=e∫G(y)dy​.

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:

(3xy+y2)+(x2+xy)dydx=0.(3xy+y^2)+(x^2+xy)\frac{dy}{dx}=0. (3xy+y2)+(x2+xy)dxdy​=0.

Identify

M=3xy+y2,N=x2+xy.M=3xy+y^2, \qquad N=x^2+xy. M=3xy+y2,N=x2+xy.

The cross-derivatives are

My=3x+2y,Nx=2x+y.M_y=3x+2y, \qquad N_x=2x+y. My​=3x+2y,Nx​=2x+y.

They are not equal, so the equation is not exact. Test for an integrating factor depending only on xxx:

My−NxN=(3x+2y)−(2x+y)x2+xy=x+yx(x+y)=1x.\begin{aligned} \frac{M_y-N_x}{N} &=\frac{(3x+2y)-(2x+y)}{x^2+xy}\\ &=\frac{x+y}{x(x+y)}\\ &=\frac1x. \end{aligned} NMy​−Nx​​​=x2+xy(3x+2y)−(2x+y)​=x(x+y)x+y​=x1​.​

On a region where the cancelled factors and xxx are nonzero, the result depends only on xxx. Therefore,

μ(x)=e∫1/x dx=eln⁡∣x∣.\mu(x)=e^{\int 1/x\,dx}=e^{\ln|x|}. μ(x)=e∫1/xdx=eln∣x∣.

Multiplying the factor by a nonzero constant doesn't change the solutions of the transformed equation. So on an interval that doesn't cross x=0x=0x=0, we can choose

μ(x)=x.\boxed{\mu(x)=x}. μ(x)=x​.

Multiply every term in the original equation by xxx:

(3x2y+xy2)+(x3+x2y)dydx=0.(3x^2y+xy^2)+(x^3+x^2y)\frac{dy}{dx}=0. (3x2y+xy2)+(x3+x2y)dxdy​=0.

The new coefficients satisfy

(3x2y+xy2)y=3x2+2xy=(x3+x2y)x,(3x^2y+xy^2)_y =3x^2+2xy =(x^3+x^2y)_x, (3x2y+xy2)y​=3x2+2xy=(x3+x2y)x​,

so the transformed equation is exact.

The ratio is undefined at x+y=0x+y=0x+y=0, 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 μ=x\mu=xμ=x extends across x+y=0x+y=0x+y=0. We still can't cross x=0x=0x=0 when treating the equations as equivalent, because that's where the multiplier itself is zero.

Now integrate the new MMM with respect to xxx:

ψ(x,y)=x3y+12x2y2+h(y).\psi(x,y)=x^3y+\frac12x^2y^2+h(y). ψ(x,y)=x3y+21​x2y2+h(y).

Then

ψy=x3+x2y+h′(y).\psi_y=x^3+x^2y+h'(y). ψy​=x3+x2y+h′(y).

Matching this with the new N=x3+x2yN=x^3+x^2yN=x3+x2y gives h′(y)=0h'(y)=0h′(y)=0. The implicit solution is

x3y+12x2y2=C.\boxed{x^3y+\frac12x^2y^2=C}. x3y+21​x2y2=C​.

Choosing a method

  1. Can the right side factor into a ttt-part and a yyy-part? Try separation.
  2. Can the equation be written as y′+P(t)y=g(t)y'+P(t)y=g(t)y′+P(t)y=g(t)? Use a linear integrating factor.
  3. Can it be written as M+Ny′=0M+Ny'=0M+Ny′=0? Check whether My=NxM_y=N_xMy​=Nx​.
  4. If it is not exact, test whether one of the one-variable integrating-factor ratios applies.
  5. 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

y′=f(t,y),y(0)=y0.y'=f(t,y), \qquad y(0)=y_0. y′=f(t,y),y(0)=y0​.

Choose finite numbers a,b>0a,b>0a,b>0. They define an open rectangle around the initial point:

R=(−a,a)×(y0−b,y0+b).R=(-a,a)\times(y_0-b,y_0+b). R=(−a,a)×(y0​−b,y0​+b).

The number aaa is the horizontal half-width in the ttt-direction. The number bbb is the vertical half-height in the yyy-direction.

Suppose fff and its partial derivative

fy=∂f∂yf_y=\frac{\partial f}{\partial y} fy​=∂y∂f​

are continuous throughout RRR. Picard's theorem (also called the Picard–Lindelöf theorem) says that there is some number hhh satisfying

0<h≤a0<h\le a 0<h≤a

such that the IVP has exactly one solution on (−h,h)(-h,h)(−h,h). Its graph stays inside the rectangle on that local interval.

What the local theorem guarantees

Picard rectangle and local solution intervalAn open rectangle has horizontal half-width a and vertical half-height b around the initial point. A unique solution is guaranteed only on a possibly shorter interval from minus h to h, where h is positive and no greater than a.−aa−hhy0​+by0​y0​−by(t)ty
The hypotheses hold in R=(−a,a)×(y0​−b,y0​+b). The theorem gives one solution on (−h,h) for some 0<h≤a; it does not say that this is the maximal interval of the solution.

The number hhh may be smaller than or equal to aaa. Being nonlinear does not force strict inequality. More importantly, (−h,h)(-h,h)(−h,h) 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 fff is enough to guarantee at least one local solution.
  • Continuity of fyf_yfy​ is a convenient sufficient condition for local uniqueness because it controls how sharply fff can change in the yyy-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

y′=y21+t+cos⁡t,y(0)=y0.y'=\frac{y^2}{1+t}+\cos t, \qquad y(0)=y_0. y′=1+ty2​+cost,y(0)=y0​.

Here

f(t,y)=y21+t+cos⁡t,fy(t,y)=2y1+t.f(t,y)=\frac{y^2}{1+t}+\cos t, \qquad f_y(t,y)=\frac{2y}{1+t}. f(t,y)=1+ty2​+cost,fy​(t,y)=1+t2y​.

Both functions are continuous wherever t≠−1t\ne-1t=−1. There is no additional restriction on yyy. Since the initial time is 000, we can take

R=(−1,1)×(y0−b,y0+b)R=(-1,1)\times(y_0-b,y_0+b) R=(−1,1)×(y0​−b,y0​+b)

for any finite b>0b>0b>0. The horizontal labels are −a-a−a and aaa, with a=1a=1a=1; bbb measures the vertical distance from y0y_0y0​. The singular time t=−1t=-1t=−1 is on the boundary and is not part of this open rectangle.

Continuity actually holds on the whole unbounded strip (−1,1)×R(-1,1)\times\mathbb R(−1,1)×R. That explains why there is no natural upper limit on bbb, but the rectangle in the theorem still uses any finite bbb rather than writing b=∞b=\inftyb=∞.

Choosing a rectangle that avoids the singularity

A Picard rectangle beside the singular timeThe example is continuous at every height when t is not minus one. The open rectangle runs from minus one to one in time and has any finite positive vertical half-height b. The singular line at t equals minus one is its excluded left boundary.t=−1a=1y0​+by0​−by0​b>0ty
For f(t,y)=1+ty2​+cost, both f and fy​ are continuous wherever t=−1. We may take a=1 and any finite b>0. The larger continuity set is unbounded in the vertical direction, but the theorem rectangle shown here is finite.

Picard's theorem now gives a unique solution on some (−h,h)(-h,h)(−h,h) with 0<h≤10<h\le10<h≤1. It does not tell us the exact value of hhh, find the solution formula, or identify the maximal solution interval.

Why the uniqueness hypothesis matters

Consider

y′=y2/3,y(0)=0.y'=y^{2/3}, \qquad y(0)=0. y′=y2/3,y(0)=0.

For real yyy, interpret the fractional power using the real cube root:

y2/3:=(y3)2=∣y∣2/3.y^{2/3}:=\left(\sqrt[3]{y}\right)^2=|y|^{2/3}. y2/3:=(3y​)2=∣y∣2/3.

This matters when y<0y<0y<0. With this convention, the constant function

y1(t)=0y_1(t)=0 y1​(t)=0

is one solution because y1′(t)=0=(y1(t))2/3y_1'(t)=0=(y_1(t))^{2/3}y1′​(t)=0=(y1​(t))2/3 and y1(0)=0y_1(0)=0y1​(0)=0. Meanwhile,

y2(t)=t327\boxed{y_2(t)=\frac{t^3}{27}} y2​(t)=27t3​​

is another. Check the second one directly in the original equation:

y2′(t)=t29,(y2(t)3)2=(t3273)2=(t3)2=t29,y2(0)=0.\begin{aligned} y_2'(t)&=\frac{t^2}{9},\\ \left(\sqrt[3]{y_2(t)}\right)^2 &=\left(\sqrt[3]{\frac{t^3}{27}}\right)^2 =\left(\frac t3\right)^2 =\frac{t^2}{9},\\ y_2(0)&=0. \end{aligned} y2′​(t)(3y2​(t)​)2y2​(0)​=9t2​,=(327t3​​)2=(3t​)2=9t2​,=0.​

The two distinct solution curves pass through the same initial point, so uniqueness fails.

The same calculation works for negative ttt: the real cube root of t3/27t^3/27t3/27 is t/3t/3t/3, which is negative, and squaring it gives t2/9t^2/9t2/9.

Separating this equation divides by y2/3y^{2/3}y2/3, so that calculation is not valid at y=0y=0y=0 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 f(t,y)=y2/3f(t,y)=y^{2/3}f(t,y)=y2/3 is continuous, but for y≠0y\ne0y=0,

fy(t,y)=23y3,f_y(t,y)=\frac{2}{3\sqrt[3]{y}}, fy​(t,y)=33y​2​,

which is undefined at y=0y=0y=0. Thus fyf_yfy​ is not continuous on any rectangle around (0,0)(0,0)(0,0). 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 (−h,h)(-h,h)(−h,h) 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

y′=y2,y(0)=y0>0.y'=y^2, \qquad y(0)=y_0>0. y′=y2,y(0)=y0​>0.

Here f(t,y)=y2f(t,y)=y^2f(t,y)=y2 and fy(t,y)=2yf_y(t,y)=2yfy​(t,y)=2y 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:

dyy2=dt.\frac{dy}{y^2}=dt. y2dy​=dt.

Integrating gives

−1y=t+C.-\frac1y=t+C. −y1​=t+C.

At t=0t=0t=0, the initial condition gives C=−1/y0C=-1/y_0C=−1/y0​. Put that back in and solve for yyy:

y(t)=11y0−t=y01−y0t.\boxed{ y(t)=\frac{1}{\frac1{y_0}-t} =\frac{y_0}{1-y_0t}. } y(t)=y0​1​−t1​=1−y0​ty0​​.​

The denominator becomes zero at t=1/y0t=1/y_0t=1/y0​, and

lim⁡t→(1/y0)−y(t)=+∞.\lim_{t\to(1/y_0)^-}y(t)=+\infty. t→(1/y0​)−lim​y(t)=+∞.

Therefore the maximal interval containing the initial time is

(−∞,1y0).\boxed{\left(-\infty,\frac1{y_0}\right)}. (−∞,y0​1​)​.

The largest symmetric interval about 000 inside this domain is only

(−1y0,1y0).\left(-\frac1{y_0},\frac1{y_0}\right). (−y0​1​,y0​1​).

That symmetric interval is still not maximal: the solution continues indefinitely to the left. This is why the symmetric (−h,h)(-h,h)(−h,h) in the local theorem should not be confused with the full solution interval.

A smooth equation can still blow up in finite time

Finite-time blowup for y prime equals y squaredThe positive solution passes through its initial point, approaches zero far to the left, and rises without bound as time approaches one over the initial value from below. The dashed line marks that finite blowup time.t=y0​1​(0,y0​)y(t)=1/y0​−t1​ty
The right side f(t,y)=y2 is smooth everywhere, so the IVP is locally unique. Its maximal interval through the initial point is (−∞,1/y0​), because the solution tends to +∞ as t→(1/y0​)−.

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 y′=yy'=yy′=y stays finite at every finite time and grows without bound only as t→∞t\to\inftyt→∞.

Linear equations have a stronger interval result

For the linear IVP

y′+p(t)y=g(t),y(t0)=y0,y'+p(t)y=g(t), \qquad y(t_0)=y_0, y′+p(t)y=g(t),y(t0​)=y0​,

Suppose ppp and ggg are continuous on an open interval III and t0∈It_0\in It0​∈I. Then there is exactly one solution on that same interval III containing t0t_0t0​, not merely on a possibly smaller neighborhood.

The integrating-factor formula explains why. Define

P(t)=∫t0tp(s) ds.P(t)=\int_{t_0}^t p(s)\,ds. P(t)=∫t0​t​p(s)ds.

Then the unique solution is

y(t)=e−P(t)[y0+∫t0teP(s)g(s) ds].\boxed{ y(t)=e^{-P(t)} \left[ y_0+\int_{t_0}^t e^{P(s)}g(s)\,ds \right]. } y(t)=e−P(t)[y0​+∫t0​t​eP(s)g(s)ds].​

Continuity makes these integrals meaningful for every t∈It\in It∈I, so the solution cannot blow up at an interior point of III. The phrase same interval does not mean all of R\mathbb RR: 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

y′+1t−2y=cos⁡(1t),y(1)=4.y'+\frac{1}{t-2}y=\cos\left(\frac1t\right), \qquad y(1)=4. y′+t−21​y=cos(t1​),y(1)=4.

The coefficient and forcing term are

p(t)=1t−2,g(t)=cos⁡(1t).p(t)=\frac{1}{t-2}, \qquad g(t)=\cos\left(\frac1t\right). p(t)=t−21​,g(t)=cos(t1​).

The function ppp is discontinuous at t=2t=2t=2, while ggg is undefined at t=0t=0t=0. Their common continuity set is split into three intervals:

(−∞,0),(0,2),(2,∞).(-\infty,0), \qquad (0,2), \qquad (2,\infty). (−∞,0),(0,2),(2,∞).

The initial time t0=1t_0=1t0​=1 lies in only one of them, so the theorem gives a unique solution on

I=(0,2).\boxed{I=(0,2)}. I=(0,2)​.

Intersect the coefficient intervals, then keep the piece containing the initial time

Common continuity interval for a linear IVPThe coefficient p is continuous except at two, and the forcing g is continuous except at zero. Their common interval containing the initial time one is the open interval from zero to two.p(t)=t−21​g(t)=cos(t1​)I=(0,2)012t0​=1
Both functions are continuous on several intervals, but the initial time t0​=1 selects I=(0,2). The linear theorem gives one solution on this same interval; no explicit solution is needed to reach that conclusion.

No explicit solution is needed. For this question, finding the common continuity interval that contains the initial time is the whole job.

Source: https://notes.ohevan.com/notes/ode/02-first-order-equations

© 2026 Evan Luo. All rights reserved.

Back to Ordinary Differential Equations

0 reads

·Last edited Oct 12, 2026
  • newsletter

  • about me

  • sponsor

© 2026 Evan Luo. All rights reserved.