First Order ODEs
First-Order Linear Differential Equations with Constant Coefficients
Introduction and Units
The fundamental equation studied is:
This is a linear, first-order differential equation with constant coefficient a. The variable y(t)→ dependent, t→ independent (time). q(t) is the source term (input), representing external influences.
Units check: If y is bank balance (dollars) and t is time (years), then each term has units dollars/year. The coefficient a (interest rate) has units 1/year (e.g., 6% per year = 0.06/yr). The source q(t) represents deposits or withdrawals, also in dollars/year.
This model assumes continuous interest and continuous deposits/withdrawals. If we change the time unit (e.g., to months), a changes accordingly (e.g., 0.5% per month).
General Solution Strategy: Particular + Null (Homogeneous)
For linear differential equations, the general solution is the sum of:
A particular solution yp(t) – one specific solution to the full equation.
The general null solution yn(t) – the solution to the associated homogeneous (null) equation dtdy=ay.
Why this works: linearity. If yp solves dtdyp=ayp+q and yn solves dtdyn=ayn, then yp+yn solves the original equation. This is because:
Nonlinear terms (like y2) would break this addition property.
Null (Homogeneous) Solution
The null equation dtdy=ay has solution:
where C is an arbitrary constant (determined by initial condition). This is because dtdeat=aeat. Multiplication by any constant preserves the solution due to linearity.
Particular Solution
Finding yp depends on the form of q(t). A powerful approach: method of undetermined coefficients – assume yp has the same functional form as q(t) (constant, exponential, polynomial, sine/cosine, etc.) and solve for the coefficients.
The full solution is y(t)=yn(t)+yp(t). The constant C is then fixed by the initial condition y(0)=y0.
Example 1: Constant Source Term
Solve: dtdy=ay+1 with y(0)=y0.
Null solution: yn=Ceat
Particular solution: Since the source is a constant, look for a constant yp=k (constant). Substituting: 0=ak+1⇒k=−a1. So yp=−a1.
General solution: y(t)=Ceat−a1
Apply initial condition: y(0)=C−a1=y0⇒C=y0+a1
Final solution:
y(t)=(y0+a1)eat−a1=y0eat+a1(eat−1)
The first term y0eat is the growth of the initial deposit. The second term represents the accumulation of the constant deposit rate over time.
Example 2: Exponential Source Term
Solve: dtdy=ay+est with s=a.
Null solution: yn=Ceat
Particular solution: Assume yp=Yest. Substitute:
dtd(Yest)=sYest=aYest+estsY=aY+1⇒Y(s−a)=1⇒Y=s−a1Particular solution: yp=s−a1est
General solution: y(t)=Ceat+s−aest
Apply initial condition y(0)=y0: y0=C+s−a1⇒C=y0−s−a1
Final solution:
y(t)=(y0−s−a1)eat+s−aest
Key concept – Transfer function: The factor s−a1 is the transfer function (or exponential response factor). It describes how the system amplifies an exponential input. If s is close to a, the response becomes large (near-resonance).
Resonance Case: s=a
When the input exponent equals the natural exponent (s=a), the formula above gives a division by zero. The particular solution changes form: look for yp=Kteat. This is the resonance case, where the forcing function drives the system at its natural frequency, leading to unbounded growth (in the linear model). The solution involves a term proportional to teat.
Example 3: Step Function Source
Solve: dtdy=ay+H(t−T), where H is the Heaviside step function:
The step function switches on at t=T.
For 0≤t<T: Source is 0. So the solution is just the null solution from initial condition: y(t)=y0eat.
For t≥T: Source is 1 (constant). The solution for a constant source starting at time T (instead of 0) is analogous to Example 1, but shifted in time. The full solution is:
y(t)=y0eat+a1(ea(t−T)−1)H(t−T)
This shows the superposition principle: the response to a delayed step is a delayed version of the step response.
Example 4: Delta Function (Impulse) Source
Solve: dtdy=ay+δ(t−T), where δ is the Dirac delta function (impulse).
What is the Delta Function?
The delta function δ(t) is not an ordinary function. It can be thought of as the derivative of the step function: δ(t)=H′(t). Its defining property is given through integration:
for sufficiently smooth f. In particular, ∫−∞∞δ(t)dt=1 and δ(t)=0 for t=0.
It models an instantaneous impulse (e.g., a bat hitting a ball, a sudden deposit). It is defined by its integral (area) rather than pointwise values.
Key integral property:
For example:
∫−∞∞etδ(t)dt=e0=1
∫−∞∞sintδ(t)dt=sin0=0
Note: Squaring the delta function δ(t)2 is not well-defined (infinite energy) and is avoided in practice.
Solving the Impulse Equation
Solve dtdy=ay+δ(t−T) with y(0)=y0.
For t<T: The impulse hasn't occurred yet. Source is 0, so y(t)=y0eat (null solution from initial condition).
At t=T: The impulse instantly adds 1 to the balance (like a lump-sum deposit of 1). This can be seen by integrating the equation over an infinitesimal interval around T: ∫T−T+dtdydt=∫T−T+(ay)dt+∫T−T+δ(t−T)dt. The left side is y(T+)−y(T−). The ay integral is negligible over an infinitesimal interval (assuming y finite). The delta integral is 1. Hence y(T+)=y(T−)+1.
For t>T: After the impulse, the source is 0 again. The solution evolves from the new initial condition y(T+)=y0eaT+1, following the homogeneous equation: y(t)=(y0eaT+1)ea(t−T)=y0eat+ea(t−T).
Final solution (written compactly):
y(t)=y0eat+H(t−T)ea(t−T)where H(t−T) is the step function (so the second term is zero for t<T).
The impulse response (response to δ(t) with zero initial condition) is eatH(t).
The impulse response is of fundamental importance because it can be used to construct the solution for any source via convolution (as we will see in the general formula).
The General Solution Formula (Integral)
For the general equation dtdy=ay+q(t) with y(0)=y0, the solution can be written as:
Why is this formula correct? It comes from the idea of superposition:
The first term y0eat is the growth of the initial condition.
The integral accounts for all later inputs: at each time s, a deposit q(s)ds occurs. That deposit then grows for the remaining time (t−s) by a factor ea(t−s). Summing over all s from 0 to t gives the integral.
This formula can be verified by differentiating with respect to t (using Leibniz rule) and checking that it satisfies the differential equation. It also subsumes all previous examples:
For q(s)=1 constant: ∫0tea(t−s)ds=a1(eat−1).
For q(s)=ess: ∫0tea(t−s)essds=eat∫0te(s−a)sds=eat⋅s−ae(s−a)t−1=s−aest−eat.
For q(s)=δ(s−T): ∫0tea(t−s)δ(s−T)ds=ea(t−T)H(t−T).
The integral formula is a particular solution plus the homogeneous part; it already incorporates the initial condition correctly.
Example 5: Cosine Source (Real Approach)
Solve: dtdy=ay+cost (with ω=1 for simplicity).
Since the source is a real cosine, the particular solution will involve both cost and sint, because derivatives of cosine produce sine. Assume:
Substitute into the equation:
Left side: yp′=−Msint+Ncost
Right side: ayp+cost=aMcost+aNsint+cost
Match coefficients of cost and sint separately:
Cosine terms: N=aM+1
Sine terms: −M=aN
Solve these two linear equations: From the sine equation: M=−aN. Substitute into cosine equation: N=a(−aN)+1=−a2N+1⇒N(1+a2)=1⇒N=1+a21 Then M=−aN=−1+a2a.
Thus the particular solution is:
The full general solution is y(t)=Ceat+yp(t), and C is determined by the initial condition. This method works but is algebraically more involved than using complex exponentials.
Preview: Complex Exponential Method
An alternative and more efficient way to handle cosine and sine sources is to use complex exponentials. Instead of solving dtdy=ay+cost, solve:
(where eit=cost+isint). Assume a particular solution of the form yp=Yeit. Substituting:
Thus yp(t)=i−a1eit. The real part of this complex solution gives the particular solution for the cost source; the imaginary part gives the particular solution for the sint source. This method simplifies the algebra, especially for higher-order equations, and naturally incorporates the phase shift and amplitude of the response. This approach will be developed further in subsequent lectures.

Ask anything
We've read this whole study set, so questions about it get the best answers.