Prerequisites: Introduction to Ordinary Differential EquationsAn ordinary differential equation of order n has an unknown function y(t) and links the n-th derivative to t, y, y', ..., y^(n-1). The general integral is the set of solutions, defined on an interval; there are usually infinitely many, depending on n constants. The Cauchy problem adds n initial conditions at a time t0 and under suitable hypotheses has a single solution. The equation y^(n) = f(t) is solved by integrating n times.Introduction to Ordinary Differential Equations →, the exponential and logarithm, the fundamental theorem of integral calculus. Related: Separable Differential EquationsFor y' = a(t) b(y) with a continuous on I and b continuous on J, the zeros of b give the constant solutions (singular integrals). The others are found by dividing by b(y) and integrating: integral of dy/b(y) = integral of a(t) dt + c, then solving for y. If b is C^1 the Cauchy problem has a unique solution, but it may exist only on a smaller interval than I; if b is only continuous uniqueness may fail (y' = cube root of y).Separable Differential Equations →.
Definition (first-order linear equation).
A first-order linear differential equation is
y′+a(t)y=b(t),a,b∈C(I), I an interval
Example. y′+2y=et is first-order linear, with a(t)=2 and b(t)=et.
It is a special case of y′=f(t,y) with f(t,y)=−a(t)y+b(t): y appears only to the first power, multiplied by a function of t, plus a term depending only on t. If b=0 the equation is called homogeneous.
How to recognize it: isolate y′ and check whether the right-hand side is "a function of t times y, plus a function of t".
| Equation |
Linear? |
a(t) |
b(t) |
| y′=logt−sinh3t⋅y |
yes |
sinh3t |
logt |
| y′=1+t2logt1+8y=1+t2logt1+1+t2logt8y |
yes |
−1+t2logt8 |
1+t2logt1 |
| y′=t+y2 |
no (y2) |
|
|
| y′=et+y=et⋅ey |
no (ey) |
|
|
(Watch the sign: with the form y′+a(t)y=b(t), the coefficient a(t) is the opposite of the one multiplying y when y′ is isolated.)
Existence and uniqueness
Theorem 1 (global existence and uniqueness, without proof). Let a,b∈C(I), with I an interval.
- The general integral of y′+a(t)y=b(t) consists of functions y∈C1(I), defined on the same interval I as a and b.
- For every initial condition x0∈R at an instant t0∈I, the Cauchy problem
{y′+a(t)y=b(t)y(t0)=x0
has one and only one solution y∈C1(I).
Example. y′+y=0, y(0)=1 has a single solution, y(t)=e−t, defined on all of R.
The theorem says two things: the solution of the Cauchy problem is unique, and its maximal interval is known at once: it is the largest interval containing t0 on which a and b are defined (and continuous). For non-linear equations this is not so (the solution can "blow up" earlier).
The solving method
Theorem 2. Let a,b∈C(I), I an interval.
- The general integral of y′+a(t)y=b(t) is
y(t)=e−A(t)[c+∫eA(t)b(t)dt]∀c∈R
where A(t)=∫a(t)dt is one primitive of a (without constant) and ∫eA(t)b(t)dt is one primitive of eA(t)b(t) (without constant: the only constant is c).
- The solution of the Cauchy problem with y(t0)=x0, t0∈I, is
y(t)=e−A(t)[x0+∫t0teA(s)b(s)ds],A(t)=∫t0ta(s)ds
(so that A(t0)=0).
Example. y′+y=1: A(t)=t and y(t)=e−t[c+∫etdt]=e−t(c+et)=ce−t+1.
Proof
1. Let y∈C1(I) be a solution:
y′(t)+a(t)y(t)=b(t)∀t∈I(*)
The trick is to multiply by the integrating factor eA(t), with A a primitive of a (it is always positive, so the new equation is equivalent):
eA(t)y′(t)+eA(t)a(t)y(t)=eA(t)b(t)
The left-hand side is the derivative of a product: by the product rule and the chain rule (A′=a),
dtd(eA(t)y(t))=eA(t)a(t)y(t)+eA(t)y′(t)
which is exactly the left-hand side. So the equation becomes
dtd(eA(t)y(t))=eA(t)b(t)
The two functions eA(t)y(t) and ∫eA(t)b(t)dt have the same derivative on the interval I, hence (primitives of a function on an interval differ by a constant) there is c∈R with
eA(t)y(t)=∫eA(t)b(t)dt+c
Multiplying by e−A(t) gives formula 1. (Conversely, by differentiating one checks that every function of that form solves the equation.)
2. Choose the primitive A(t)=∫t0ta(s)ds, which vanishes at t0. As above one gets dsd(eA(s)y(s))=eA(s)b(s), but now one integrates definitely between t0 and t (by the fundamental theorem of integral calculus):
∫t0tdsd(eA(s)y(s))ds=eA(t)y(t)−eA(t0)y(t0)=eA(t)y(t)−x0
(with eA(t0)=e0=1 and y(t0)=x0). Equating to ∫t0teA(s)b(s)ds and multiplying by e−A(t) gives formula 2 ∎.
In practice there is no need to remember formula 2: find the general integral with formula 1 and then choose c so that y(t0)=x0.
The homogeneous case
If b=0 the integral in the formula is 0 and what remains is
y′+a(t)y=0⟹y(t)=ce−A(t),A(t)=∫a(t)dt, c∈R
The Malthus model
y′=ay is written y′−ay=0: it is linear homogeneous, with constant coefficient −a in place of a(t) and I=R. A primitive of −a is −at, hence
y(t)=ceat∀c∈R, ∀t∈R
- a=0: constant population;
- a>0: exponential growth;
- a<0: exponential decay (extinction).
Grafico interattivo: Solutions of y' = a·y with y(0) = 1: y = e^{at} grows for a > 0, stays constant for a = 0, decays towards 0 for a < 0
The problem: a=3, t0=0, x0=50 inhabitants. From y(t)=ce3t and y(0)=ce0=c=50:
y(t)=50e3t,y(100)=50e300
an enormous number (e300≈2⋅10130): the Malthus model is good only for short times, because it ignores limited resources.
A trick: second-order equations without y
If in a second-order equation only y′′ and y′ appear (not y), set v=y′: then v′=y′′ and the equation becomes first-order in v. Once v is found, y is obtained by integrating once.
Common mistakes
- Getting the sign of a(t) wrong: the formula holds for the form y′+a(t)y=b(t). With y′=ty+… one has a(t)=−t1.
- Adding constants in A(t) or in ∫eAb: the only constant is c. A constant in A would multiply c and the result would not change, but the computations get more complicated.
- Putting c outside the bracket: e−A[c+∫eAb] is not ce−A⋅∫eAb.
- Forgetting the interval: with a(t)=−t1 the solution lives on ]0,+∞[ or on ]−∞,0[, depending on where t0 lies.
Versione ripasso
A first-order linear differential equation is
y′+a(t)y=b(t),a,b∈C(I), I an interval
If b=0 the equation is called homogeneous. To recognize it, isolate y′: the right-hand side must be "function of t times y, plus function of t", and the coefficient of y with changed sign is a(t). E.g. y′=logt−sinh3t⋅y is linear with a(t)=sinh3t; y′=t+y2 is not.
Existence and uniqueness
For a,b∈C(I), the Cauchy problem
{y′+a(t)y=b(t)y(t0)=x0
has one and only one solution y∈C1(I), defined on the whole interval I where a and b are continuous.
The solving method
Theorem. Let a,b∈C(I), A(t)=∫a(t)dt. The general integral is:
y(t)=e−A(t)[c+∫eA(t)b(t)dt],c∈R
(primitives without constant: the only constant is c). With y(t0)=x0: y(t)=e−A(t)[x0+∫t0teA(s)b(s)ds] with A(t)=∫t0ta(s)ds; in practice, choose c in the general formula.
Idea of the proof. Multiply the equation by the integrating factor eA(t). The left-hand side becomes the derivative of a product: dtd(eA(t)y(t))=eA(t)b(t). Integrate both sides and isolate y.
Homogeneous case (b=0): y(t)=ce−A(t).
Example: y′+y=1: A=t, y=e−t(c+et)=ce−t+1.
Malthus model
Equation y′=ay, i.e. y′−ay=0 (linear homogeneous, coefficient −a). Solution: y(t)=ceat.
- a>0: exponential growth; a=0: constant.
- a<0: exponential decay.
- With a=3, y(0)=50: y(t)=50e3t, y(100)=50e300 (the model is valid only for short times).
Trick: second-order equations without y
If the equation has the form f(t,y′,y′′)=0, set v(t)=y′(t). The equation becomes first-order in v: f(t,v,v′)=0. Once v is found, integrate to find y.
Common mistakes
- Sign of a(t): forgetting the opposite sign after isolating y′.
- Arbitrary constants: adding extra constants while computing A(t) or the integral; the only constant is c in the final result.
- Distributing c: forgetting that c must be multiplied by e−A(t).
- Domain: ignoring that the interval of definition is dictated by the discontinuities of a(t) and b(t): with a(t)=−t1 one stays in ]0,+∞[ or in ]−∞,0[, depending on where t0 lies.