A differential equation (DE) is an equation involving an unknown function and its derivatives. An ordinary differential equation (ODE) involves a function of one variable and its ordinary Derivatives. A partial differential equation (PDE) involves a function of several variables and Its partial derivatives.
1.2 Classification of ODEs
An ODE is:
Ordinary vs. partial: depends on whether partial derivatives appear.
Order: the highest derivative that appears.
Linear vs. nonlinear: linear if the unknown function and its derivatives appear linearly.
Homogeneous vs. nonhomogeneous: for linear ODEs, homogeneous if the forcing term is zero.
1.3 Initial and Boundary Value Problems
An initial value problem (IVP) specifies the value of the function (and possibly its Derivatives) at a single point. A boundary value problem (BVP) specifies conditions at two or More points.
1.4 Examples from Physics and Biology
Differential equations arise throughout the natural sciences. A few canonical examples:
Newton”s law of cooling. The temperature T(t) of a body in a medium at temperature Tm satisfies dtdT=−k(T−Tm)A first-order linear ODE.
Harmonic oscillator. A mass on a spring with damping obeys mdt2d2x+cdtdx+kx=F(t)A second-order linear ODE.
Logistic population growth.dtdP=rP(1−KP)A first-order nonlinear (Bernoulli) ODE.
│ │ └── Nonlinear (y or derivatives appear nonlinearly)
│ └── By coefficients
│ ├── Constant coefficient
│ └── Variable coefficient
└── PDE (multiple independent variables)
├── Elliptic: B² - 4AC < 0 (e.g., Laplace)
├── Parabolic: B² - 4AC = 0 (e.g., Heat)
└── Hyperbolic: B² - 4AC > 0 (e.g., Wave)
1.6 Worked Example: Classifying ODEs
Problem. Classify each equation by order, linearity, and homogeneity (if linear).
(a) y′′+3y′+2y=sinx
(b) (y′)2+y=0
(c) x2y′′+xy′+(x2−1)y=0
(d) ∂x2∂2u+∂y2∂2u=0
Solution
(a) Second-order, linear, nonhomogeneous (forcing term sinx=0).
(b) First-order, nonlinear (the term (y′)2 is nonlinear in y′).
(c) Second-order, linear, homogeneous. This is Bessel’s equation of order 1.
(d) Second-order PDE, linear, homogeneous. This is Laplace’s equation; A=1, C=1, B=0 So B2−4AC=−4<0 (elliptic). ■
2. First-Order ODEs
2.1 Separable Equations
A first-order ODE dxdy=f(x,y) is separable if f(x,y)=g(x)h(y).
dxdy=g(x)h(y)⟹h(y)dy=g(x)dx
Integrating both sides: ∫h(y)dy=∫g(x)dx+C.
Example. Solve dxdy=xy.
Separating: ydy=xdx. Integrating: ln∣y∣=2x2+C. Thus y=Cex2/2 where C=0Plus the trivial solution y=0.
2.2 Linear First-Order Equations
A linear first-order ODE has the form
dxdy+P(x)y=Q(x)
Theorem 2.1 (Integrating Factor). The solution is
y(x)=e−∫P(x)dx(∫Q(x)e∫P(x)dxdx+C)
Proof. Multiply both sides by μ(x)=e∫P(x)dx:
dxd(μy)=μdxdy+μPy=μdxdy+μ′y=μ(dxdy+Py)=μQ
Integrating: μy=∫μQdx+C. Solving for y gives the result. ■
2.3 Worked Example: Linear Equation
Problem. Solve y′+x2y=x2 for x>0.
Solution.P(x)=2/x, Q(x)=x2.
μ(x)=e∫2/xdx=e2lnx=x2.
y=x−2(∫x2⋅x2dx+C)=x−2(5x5+C)=5x3+x2C. ■
2.4 Exact Equations
The ODE M(x,y)dx+N(x,y)dy=0 is exact if ∂y∂M=∂x∂N.
When exact, there exists Ψ(x,y) such that ∂x∂Ψ=M and ∂y∂Ψ=NAnd the solution is Ψ(x,y)=C.
Theorem 2.2. If M and N have continuous partial derivatives on a connected domain DThen Mdx+Ndy=0 is exact if and only if My=Nx.
Proof. If exact, M=Ψx and N=ΨySo My=Ψxy=Ψyx=Nx by Clairaut. Conversely, if My=NxDefine Ψ(x,y)=∫x0xM(t,y)dt+∫y0yN(x0,s)ds. Then Ψx=M(x,y) and Ψy=∫x0xMy(t,y)dt+N(x0,y)=∫x0xNx(t,y)dt+N(x0,y)=N(x,y)−N(x0,y)+N(x0,y)=N(x,y). ■
If My=NxOne can sometimes find an integrating factorμ(x,y) such that (μM)y=(μN)x.
Case 1: If NMy−Nx depends only on xThen μ(x)=e∫NMy−Nxdx.
Case 2: If MNx−My depends only on yThen μ(y)=e∫MNx−Mydy.
2.7 Bernoulli Equations
A Bernoulli equation has the form
dxdy+P(x)y=Q(x)yn
Where n=0,1. The substitution v=y1−n transforms it into a linear equation:
dxdv+(1−n)P(x)v=(1−n)Q(x)
Example. Solve y′+y=y2ex.
Here n=2So set v=y−1. Then v′=−y−2y′And the equation becomes v′−v=−ex. Integrating factor: e−x. So (ve−x)′=−1Giving ve−x=−x+C, v=−xex+Cex And y=1/(C−x)ex.
2.8 Existence and Uniqueness
Theorem 2.3 (Picard-Lindelöf). If f and ∂f/∂y are continuous on a rectangle Containing (x0,y0)Then the IVP y′=f(x,y), y(x0)=y0 has a unique solution in some Neighbourhood of x0.
2.9 Substitution Methods
Several substitutions reduce specific equations to separable or linear form:
Homogeneous equations: y′=f(y/x). Set v=y/x.
Equations of the form y′=f(ax+by+c): set v=ax+by+c.
2.10 Homogeneous Equations
An ODE of the form dxdy=F(xy) is called homogeneous (not to be Confused with the linearity sense). The substitution v=y/xI.e., y=vxGives y′=v+xv′ So the equation becomes:
v+xdxdv=F(v)⟹xdxdv=F(v)−v
This is separable: F(v)−vdv=xdx.
2.11 Worked Example: Homogeneous Equation
Problem. Solve y′=xyx2+y2.
Solution
Solution. Rewrite as y′=y/x1+(y/x)2. This is homogeneous with F(v)=v1+v2.
Set y=vx: v+xv′=v1+v2=v+v1.
So xv′=v1Giving vdv=xdx.
Integrating: 2v2=ln∣x∣+C. Since v=y/x:
2x2y2=ln∣x∣+C⟹y2=2x2(ln∣x∣+C). ■
2.12 Riccati Equations
A Riccati equation has the form
dxdy=q0(x)+q1(x)y+q2(x)y2
If a particular solution y1(x) is known, the substitution y=y1+v1 reduces the Riccati equation to a linear first-order equation in v:
dxdv=−(q1+2q2y1)v−q2
Example. Solve y′=1+x2−2xy+y2 given that y1=x is a particular solution.
Substituting y=x+1/v: y′=1−v′/v2. The equation becomes
1−v′/v2=1+x2−2x(x+1/v)+(x+1/v)2
1−v′/v2=1+x2−2x2−2x/v+x2+2x/v+1/v2
1−v′/v2=1+1/v2
−v′/v2=1/v2⟹v′=−1
So v=−x+CAnd y=x+C−x1.
2.13 Worked Example: Newton’s Law of Cooling
Problem. A body at 90°C is placed in a room at 20°C. After 10 Minutes, its temperature is 60°C. When will it reach 30°C?
Solution
Solution. Newton’s law of cooling: dtdT=−k(T−20), T(0)=90.
This is separable: T−20dT=−kdt.
ln(T−20)=−kt+C⟹T=20+Ce−kt.
T(0)=90⟹C=70So T=20+70e−kt.
T(10)=60⟹60=20+70e−10k⟹e−10k=4/7.
k=−101ln(4/7)=10ln(7/4).
For T=30: 30=20+70e−kt⟹e−kt=1/7⟹t=kln7=ln(7/4)10ln7.
Numerically: t≈0.559610⋅1.946≈34.8 minutes. ■
2.14 Worked Example: Mixing Problem
Problem. A tank contains 100 L of brine with 20 kg of salt. Fresh water enters at 3 L/min and The mixture leaves at 3 L/min. Find the amount of salt after 30 minutes.
Solution
Solution. Let Q(t) be the amount of salt (kg) at time t (min).
Rate of change: dtdQ=ratein−rateout=0−3⋅100Q.
dtdQ=−1003Q, Q(0)=20.
This is separable: QdQ=−1003dt.
lnQ=−1003t+C⟹Q=Ce−3t/100.
Q(0)=20⟹Q=20e−3t/100.
At t=30: Q(30)=20e−0.9≈20⋅0.4066≈8.13 kg. ■
2.15 Worked Example: Integrating Factor
Problem. Solve (3xy+2y2)dx+(x2+2xy)dy=0.
Solution
Solution.M=3xy+2y2, N=x2+2xy.
My=3x+4y, Nx=2x+2y. Since My=NxNot exact.
Check Case 1: NMy−Nx=x2+2xyx+2y=x(x+2y)x+2y=x1.
This depends only on xSo μ(x)=e∫1/xdx=x.
Multiply: (3x2y+2xy2)dx+(x3+2x2y)dy=0.
M~=3x2y+2xy2, N~=x3+2x2y.
M~y=3x2+4xy=N~x. Now exact.
Ψx=3x2y+2xy2⟹Ψ=x3y+x2y2+h(y).
Ψy=x3+2x2y+h′(y)=x3+2x2y⟹h′(y)=0⟹h(y)=0.
Solution: x3y+x2y2=C. ■
2.16 Orthogonal Trajectories
Given a one-parameter family of curves F(x,y,C)=0The orthogonal trajectories are curves That intersect every member of the family at right angles. To find them:
Find the differential equation dxdy=f(x,y) of the given family.
Replace dxdy with −dydx (equivalently, negate the slope).
Solve the new ODE.
Example. Find the orthogonal trajectories of y=Cx2.
dxdy=2Cx=x2y.
Orthogonal trajectories satisfy dxdy=−2yx.
Separating: 2ydy=−xdx. Integrating: y2=−2x2+COr 2x2+y2=C. These are ellipses.
2.17 Common Pitfalls for First-Order ODEs
:::caution Common Pitfall When separating variables, dividing by h(y) can lose solutions where h(y)=0. Always check whether h(y)=0 yields valid solutions before dividing. :::
:::caution Common Pitfall Not every first-order ODE falls into a standard category. Equations like y′=ex2+sin(y2) cannot be solved by elementary methods and require numerical Techniques. :::
3. Second-Order Linear ODEs
3.1 General Theory
A second-order linear ODE has the form
y′′+p(x)y′+q(x)y=g(x)
Theorem 3.1. If y1 and y2 are solutions of the homogeneous equation y′′+py′+qy=0 Then c1y1+c2y2 is also a solution (superposition principle).
Theorem 3.2 (Wronskian Criterion). Two solutions y1,y2 of the homogeneous equation form a fundamental set (i.e., span all solutions) if and only if their Wronskian is non-zero:
W(y1,y2)(x)=y1y1′y2y2′=0
Abel’s identity states that W(x)=W(x0)e−∫x0xp(t)dt.
Theorem 3.3. The general solution of y′′+py′+qy=g is y=yh+ypWhere yh is the General solution of the homogeneous equation and yp is any particular solution.
3.2 Homogeneous Equations with Constant Coefficients
For y′′+ay′+by=0 with a,b constants, try y=erx:
r2+ar+b=0
Case 1: Two distinct real roots r1=r2.yh=c1er1x+c2er2x.
Case 2: Repeated root r.yh=c1erx+c2xerx.
Case 3: Complex conjugate roots r=α±iβ.yh=eαx(c1cos(βx)+c2sin(βx)).
For equations y′′+ay′+by=g(x) where g(x) is a polynomial, exponential, sine, cosine, or Products of these, guess the form of yp and solve for coefficients.
g(x)
Guess for yp
Pn(x)
Anxn+⋯+A0
eax
Aeax
sin(bx) or cos(bx)
Asin(bx)+Bcos(bx)
eaxPn(x)
eax(Anxn+⋯+A0)
eaxsin(bx) or eaxcos(bx)
eax(Asin(bx)+Bcos(bx))
Rule. If any term of the guess is a solution of the homogeneous equation, multiply by x (or x2 if already multiplied by x).
The amplitude grows linearly with t --- this is resonance. Physically, the system absorbs energy From the periodic forcing at its natural frequency, causing unbounded oscillations.
Worked Example. Solve y′′+9y=6cos(3t), y(0)=0, y′(0)=0.
Theorem 3.4 (Variation of Parameters). For y′′+p(x)y′+q(x)y=g(x)Let y1,y2 be a Fundamental set of solutions of the homogeneous equation. Then a particular solution is
yp=−y1∫Wy2gdx+y2∫Wy1gdx
Where W=W(y1,y2)=y1y2′−y2y1′.
Proof. Seek yp=u1(x)y1(x)+u2(x)y2(x). Impose the constraint u1′y1+u2′y2=0. Then yp′=u1y1′+u2y2′ and yp′′=u1′y1′+u1y1′′+u2′y2′+u2y2′′. Substituting into the ODE: (u1′y1′+u2′y2′)+u1(y1′′+py1′+qy1)+u2(y2′′+py2′+qy2)=g. Since y1,y2 satisfy the homogeneous equation, this reduces to u1′y1′+u2′y2′=g. Together With u1′y1+u2′y2=0Solving gives the formulas above. ■
3.11 Worked Example: Variation of Parameters
Problem. Solve y′′+y=tanx using variation of parameters.
Theorem 3.5. Given one solution y1(x) of y′′+p(x)y′+q(x)y=0A second linearly Independent solution is obtained by setting y2=y1∫y12e−∫p(x)dxdx.
Proof. Seek y2=v(x)y1(x). Then y2′=v′y1+vy1′ and y2′′=v′′y1+2v′y1′+vy1′′. Substituting into the ODE:
v′′y1+2v′y1′+vy1′′+p(v′y1+vy1′)+qvy1=0
v′′y1+v′(2y1′+py1)+v(y1′′+py1′+qy1)=0
Since y1 satisfies the ODE, the coefficient of v vanishes:
v′′y1+v′(2y1′+py1)=0
Let w=v′. Then w′y1+w(2y1′+py1)=0A separable first-order ODE:
ww′=−y12y1′+py1=−2y1y1′−p
lnw=−2lny1−∫pdx⟹w=y12e−∫pdx
Since w=v′We obtain the result. ■
Worked Example. Given that y1=ex solves y′′−2y′+y=0Find a second solution.
Solution
Solution. Here p(x)=−2So e−∫pdx=e2x.
y2=ex∫e2xe2xdx=ex∫1dx=xex.
This gives yh=c1ex+c2xexConsistent with the repeated-root case (r=1 with Multiplicity 2). ■
3.13 Euler-Cauchy Equations
An Euler-Cauchy (equidimensional) equation has the form
x2y′′+axy′+by=0,x>0
The substitution y=xr gives the characteristic equation
r(r−1)+ar+b=r2+(a−1)r+b=0
Case 1: Two distinct real roots r1=r2.yh=c1xr1+c2xr2.
Case 2: Repeated root r.yh=c1xr+c2xrlnx.
Case 3: Complex roots r=α±iβ.yh=xα(c1cos(βlnx)+c2sin(βlnx)).
3.14 Worked Example: Euler-Cauchy Equation
Problem. Solve x2y′′−3xy′+4y=0.
Solution
Solution. Try y=xr: r(r−1)−3r+4=r2−4r+4=(r−2)2=0.
Repeated root r=2.
y=c1x2+c2x2lnx. ■
Worked Example. Solve x2y′′+xy′+y=0.
Solution
Solution.r(r−1)+r+1=r2+1=0. Roots r=±i.
Here α=0, β=1.
y=c1cos(lnx)+c2sin(lnx). ■
3.15 Higher-Order Linear ODEs
For y(n)+an−1y(n−1)+⋯+a1y′+a0y=0:
Characteristic equation rn+an−1rn−1+⋯+a0=0.
For root r of multiplicity m: include erx,xerx,…,xm−1erx.
For complex roots α±iβ of multiplicity m: include eαxxkcos(βx) and eαxxksin(βx) for k=0,…,m−1.
3.16 Spring-Mass-Damper Systems
A mass m on a spring with spring constant k and damping coefficient cSubject to external force F(t)Satisfies
mx′′+cx′+kx=F(t)
Dividing by m and setting ω0=k/m, γ=c/(2m):
x′′+2γx′+ω02x=mF(t)
The homogeneous solution depends on the discriminant γ2−ω02:
Condition
Type
Homogeneous Solution
γ2<ω02
Underdamped
e−γt(c1cos(ωdt)+c2sin(ωdt)), ωd=ω02−γ2
γ2=ω02
Critical
e−γt(c1+c2t)
γ2>ω02
Overdamped
c1er1t+c2er2t, r1,2=−γ±γ2−ω02
3.17 Common Pitfalls for Second-Order ODEs
:::caution Common Pitfall When using undetermined coefficients, always check whether your guess Overlaps with the homogeneous solution. For y′′−4y=e2xGuessing yp=Ae2x fails Because e2x satisfies the homogeneous equation. You must use yp=Axe2x instead. :::
:::caution Common Pitfall For Euler-Cauchy equations, the substitution y=xr only works for x>0. For x<0Substitute x=−et or use y=(−x)r. :::
:::caution Common Pitfall Variation of parameters always works but can lead to difficult integrals. If the forcing term g(x) is a polynomial, exponential, sine, or cosine (or products of these), Prefer undetermined coefficients --- it is much faster. :::
3.18 Abel’s Identity (Proof)
Theorem 3.6 (Abel’s Identity). If y1,y2 are solutions of y′′+p(x)y′+q(x)y=0 Then their Wronskian satisfies
W(x)=W(x0)e−∫x0xp(t)dt
Proof. Since y1,y2 satisfy the ODE:
y1′′=−py1′−qy1 and y2′′=−py2′−qy2.
W′=y1y2′′+y1′y2′−y1′′y2−y1′y2′
=y1(−py2′−qy2)−(−py1′−qy1)y2
=−p(y1y2′−y1′y2)=−pW.
So W′+pW=0Giving W=Ce−∫pdxAnd evaluating at x0 gives the result. ■
Corollary.W(x) is either identically zero or never zero.
3.19 Worked Example: Variation of Parameters (Second Example)
Problem. Solve y′′−4y=xex using variation of parameters.
A system of first-order linear ODEs can be written in matrix form:
x′=Ax+f(t)
Where A is an n×n matrix and x,f∈Rn.
4.2 Homogeneous Systems with Constant Coefficients
For x′=AxTry x=veλt:
λv=Av
So λ is an eigenvalue of A and v is the corresponding eigenvector.
Case 1: A has n distinct real eigenvalues. The general solution is
x=c1v1eλ1t+⋯+cnvneλnt
Case 2: A has a repeated eigenvalue λ with algebraic multiplicity m and geometric Multiplicity k<m. Include terms involving tjeλt where generalized Eigenvectors fill out the solution space.
Case 3: Complex eigenvalues λ=α±iβ with eigenvector v=a±ib. The real solutions are eαt(acos(βt)−bsin(βt)) and eαt(asin(βt)+bcos(βt)).
4.3 The Matrix Exponential
Definition.eAt=∑k=0∞k!Aktk.
Theorem 4.1. The solution to x′=Ax with x(0)=x0 is x(t)=eAtx0.
Proposition 4.2. If A is diagonalizable as A=PDP−1Then eAt=PeDtP−1 Where eDt=diag(eλ1t,…,eλnt).
First find the partial fraction decomposition of s(s+1)(s+2)1:
s(s+1)(s+2)1=sA+s+1B+s+2C
1=A(s+1)(s+2)+Bs(s+2)+Cs(s+1)
s=0: 1=2A⟹A=1/2s=−1: 1=−B⟹B=−1s=−2: 1=2C⟹C=1/2
So L−1{s(s+1)(s+2)1}=21−e−t+21e−2t.
By the second shifting theorem:
y(t)=u2(t)[21−e−(t−2)+21e−2(t−2)] for t≥0. ■
5.10 The Heaviside Function
The Heaviside (unit step) function is defined as
uc(t)={01t<ct≥c
It models a sudden switch being turned on at time t=c. The second shifting theorem states:
L{uc(t)f(t−c)}=e−csF(s)
Conversely, if Y(s)=e−csG(s)Then y(t)=uc(t)⋅g(t−c) where g=L−1{G}.
5.11 The Dirac Delta Function
The Dirac delta functionδ(t−c) satisfies ∫0∞δ(t−c)f(t)dt=f(c) for continuous f. It models an instantaneous Impulse.
L{δ(t−c)}=e−cs.
Properties:
δ(t−c)=0 for t=c
∫−∞∞δ(t−c)dt=1
∫−∞∞δ(t−c)f(t)dt=f(c) (sifting property)
5.12 Worked Example: Impulse Response
Problem. An undamped spring-mass system (m=1, k=4) is struck by an impulse at t=0: y′′+4y=δ(t), y(0)=0, y′(0)=0. Find y(t).
Solution
Solution. Taking Laplace transforms:
s2Y+4Y=1
Y=s2+41
y(t)=21sin(2t).
This is the impulse response (Green’s function) for the operator D2+4. ■
5.13 Worked Example: IVP with Laplace
Problem. Solve y′′−6y′+9y=6e3t, y(0)=0, y′(0)=0.
Solution
Solution. Taking Laplace transforms:
s2Y−6sY+9Y=s−36
(s−3)2Y=s−36
Y=(s−3)36
Using the table: L{tneat}=(s−a)n+1n!.
y(t)=6⋅2!t2e3t=3t2e3t. ■
5.14 Common Pitfalls for Laplace Transforms
:::caution Common Pitfall The Laplace transform of y′(t) is sY(s)−y(0)Not sY(s). The Initial conditions are built into the transform. Forgetting them leads to incorrect solutions. :::
:::caution Common Pitfall When using the second shifting theorem, the time-shifted function must Be written as uc(t)f(t−c)Not uc(t)f(t). The function f must be shifted by the same Amount as the step. :::
5.15 Proof Sketch: Picard Iteration
The Picard-Lindelöf theorem can be proved constructively via Picard iteration. For the IVP y′=f(x,y), y(x0)=y0Define the sequence
ϕ0(x)=y0,ϕn+1(x)=y0+∫x0xf(t,ϕn(t))dt
If f and ∂f/∂y are continuous, one shows by induction that (ϕn) is uniformly Cauchy on some interval [x0−h,x0+h]Hence converges uniformly to a function ϕ. Passing to the limit in the integral equation shows ϕ satisfies the ODE. Uniqueness follows From the Gronwall inequality applied to the difference of two solutions.
6. Series Solutions
6.1 Power Series Method
For an ODE y′′+p(x)y′+q(x)y=0 where p and q are analytic near x0Substitute the Power series y=∑n=0∞an(x−x0)n and solve for the coefficients.
6.2 Ordinary and Regular Singular Points
x0 is an ordinary point if p and q are analytic at x0. It is a regular singular Point if (x−x0)p(x) and (x−x0)2q(x) are analytic at x0.
6.3 Frobenius Method
At a regular singular point x0=0Substitute y=∑n=0∞anxn+r. The indicial equation determines the possible values of r.
Theorem 6.1. If the roots r1≥r2 of the indicial equation differ by a non-integer, there Are two linearly independent solutions of the form xr1∑anxn and xr2∑bnxn.
6.4 Bessel’s Equation
Bessel’s equation of order ν:
x2y′′+xy′+(x2−ν2)y=0
For ν∈/ZThe solutions are Jν(x) and J−ν(x) (Bessel functions of the First kind). For ν=n∈NThe second solution is the Weber function Yn(x).
The Fourier coefficients are derived using the orthogonality relations on [−π,π]:
∫−ππcos(mx)cos(nx)dx=⎩⎨⎧π2π0m=n=0m=n=0m=n
∫−ππsin(mx)sin(nx)dx={π0m=n=0m=n
∫−ππcos(mx)sin(nx)dx=0forallm,n
To find anMultiply both sides of the Fourier expansion by cos(nx) and integrate over [−π,π]. By orthogonality, all terms vanish except the cos(nx) term, yielding anπ=∫−ππf(x)cos(nx)dx. Similarly for bn.
7.3 Convergence
Theorem 7.1 (Dirichlet’s Theorem). If f is 2π-periodic and piecewise smooth, its Fourier Series converges to:
f(x) at points where f is continuous.
2f(x+)+f(x−) at jump discontinuities.
7.4 Parseval’s Identity
π1∫−ππ∣f(x)∣2dx=2a02+∑n=1∞(an2+bn2)
Intuition. Parseval’s identity is the infinite-dimensional analogue of the Pythagorean theorem: The “energy” of f (its L2 norm squared) equals the sum of the energies of its Fourier Components.
7.5 Sine and Cosine Series
For functions defined on [0,L]:
Cosine series (even extension): an=L2∫0Lf(x)cosLnπxdxbn=0.
Sine series (odd extension): an=0bn=L2∫0Lf(x)sinLnπxdx.
7.6 Worked Example: Fourier Sine Series
Problem. Find the Fourier series of f(x)=x on (−π,π)Extended 2π-periodically.
Parabolic (B2−4AC=0): e.g., the heat equation ut=α2uxx.
Hyperbolic (B2−4AC>0): e.g., the wave equation utt=c2uxx.
8.2 The Heat Equation
ut=α2uxx,0<x<L,t>0
With boundary conditions u(0,t)=u(L,t)=0 and initial condition u(x,0)=f(x).
8.3 Derivation of the Heat Equation
Consider a thin rod of length L with uniform cross-section and density ρ. Let u(x,t) be the Temperature at position x and time t. By Fourier’s law of heat conduction, the heat flux Through a cross-section is proportional to the negative temperature gradient:
q=−κux
Where κ is the thermal conductivity. Conservation of energy on [x,x+Δx]:
ρc∂t∂uΔx=q(x)−q(x+Δx)=−κux(x)+κux(x+Δx)
Dividing by Δx and taking Δx→0:
ρcut=κuxx⟹ut=ρcκuxx=α2uxx
Where α2=κ/(ρc) is the thermal diffusivity.
8.4 Solving the Heat Equation by Separation of Variables
Assume u(x,t)=X(x)T(t). Substituting:
XT′=α2X′′T⟹α2TT′=XX′′=−λ
This gives two ODEs:
X′′+λX=0,X(0)=X(L)=0T′+α2λT=0
The boundary value problem for X has solutions only for λn=(nπ/L)2n=1,2,3,…With Xn(x)=sin(nπx/L).
The corresponding Tn(t)=e−α2(nπ/L)2t.
By superposition:
u(x,t)=∑n=1∞bnsinLnπxe−α2(nπ/L)2t
Where bn=L2∫0Lf(x)sinLnπxdx (the sine series coefficients of f).
8.5 Worked Example: Heat Equation
Problem. Solve ut=uxx for 0<x<π, t>0With u(0,t)=u(π,t)=0 And u(x,0)=sin(2x)+3sin(5x).
Solution. Here α=1 and L=π. The initial condition is already a sine series.
λn=n2, Xn=sin(nx), Tn=e−n2t.
u(x,t)=e−4tsin(2x)+3e−25tsin(5x). ■
8.6 The Wave Equation
utt=c2uxx,0<x<L,t>0
With boundary conditions u(0,t)=u(L,t)=0And initial conditions u(x,0)=f(x)ut(x,0)=g(x).
8.7 Derivation of the Wave Equation
Consider a string of length L under tension T. Let u(x,t) be the vertical displacement. For A small segment [x,x+Δx]Newton’s second law in the vertical direction gives:
ρΔxutt=Tsinθ(x+Δx)−Tsinθ(x)
For small displacements, sinθ≈tanθ=uxSo:
ρutt=TΔxux(x+Δx)−ux(x)Δx→0Tuxx
utt=ρTuxx=c2uxx,c=T/ρ
8.8 Solving the Wave Equation
Separation of variables u(x,t)=X(x)T(t) gives:
X′′+λX=0,T′′+c2λT=0
With λn=(nπ/L)2:
Xn(x)=sinLnπx,Tn(t)=ancosLcnπt+bnsinLcnπt
u(x,t)=∑n=1∞sinLnπx(ancosLcnπt+bnsinLcnπt)
Where an=L2∫0Lf(x)sinLnπxdx and bn=cnπ2∫0Lg(x)sinLnπxdx.
8.9 D’Alembert’s Solution
For the wave equation on −∞<x<∞:
u(x,t)=2f(x+ct)+f(x−ct)+2c1∫x−ctx+ctg(s)ds
This represents the solution as a superposition of right-moving and left-moving waves.
8.10 Laplace’s Equation
uxx+uyy=0
On a domain Ω⊆R2With boundary conditions on ∂Ω.
Theorem 8.1 (Maximum Principle). A harmonic function u (satisfying Laplace’s equation) on a Bounded domain attains its maximum and minimum on the boundary.
Theorem 8.2 (Uniqueness). The Dirichlet problem for Laplace’s equation has at most one solution.
Proof. If u1 and u2 are two solutions with the same boundary data, then v=u1−u2 is Harmonic with v=0 on ∂Ω. By the maximum principle, v≡0. ■
8.11 Worked Example: Wave Equation
Problem. A string of length π with fixed ends is plucked: u(x,0)=x(π−x)ut(x,0)=0. Find u(x,t).
Solution. With c=1 and L=π: an=π2∫0πx(π−x)sin(nx)dxbn=0 (since g=0).
On [a,b] with homogeneous boundary conditions, where p,w>0 and p,p′,q,w are continuous.
Key properties:
The eigenvalues are real and form an infinite increasing sequence λ1<λ2<⋯→∞.
Eigenfunctions corresponding to distinct eigenvalues are orthogonal with respect to the weight w(x): ∫abym(x)yn(x)w(x)dx=0 for m=n.
The eigenfunctions form a complete set in the weighted L2 space.
Remark. The boundary value problems encountered in the heat and wave equations (X′′+λX=0 with X(0)=X(L)=0) are special cases of Sturm-Liouville problems With p=1, q=0, w=1.
8.14 Neumann Boundary Conditions
When the boundary specifies the derivative (heat flux) rather than the value, we have Neumann Conditions. For the heat equation:
ux(0,t)=0,ux(L,t)=0
(insulated ends). The separation of variables gives X′(0)=X′(L)=0Yielding eigenvalues λ0=0 with X0=1And λn=(nπ/L)2 for n≥1 with Xn=cos(nπx/L).
The solution is
u(x,t)=2a0+∑n=1∞ancosLnπxe−α2(nπ/L)2t
Where an=L2∫0Lf(x)cosLnπxdx.
Remark. As t→∞All exponential terms decay, and u(x,t)→a0/2The average Value of the initial temperature. Physically, an insulated rod reaches a uniform steady-state Temperature.
8.15 Worked Example: Heat Equation with Non-Trivial Initial Data
Problem. Solve ut=uxx for 0<x<π, t>0With u(0,t)=u(π,t)=0 And u(x,0)=x(π−x).
Solution
Solution. The sine series of f(x)=x(π−x) on [0,π] has coefficients
bn=π2∫0πx(π−x)sin(nx)dx=πn34(1−(−1)n).
(Computed in Section 8.11.)
For even n: bn=0. For odd n=2k+1: bn=πn38.
u(x,t)=π8∑k=0∞(2k+1)3sin((2k+1)x)e−(2k+1)2t. ■
8.16 Worked Example: D’Alembert’s Solution
Problem. Solve utt=4uxx for −∞<x<∞ with u(x,0)=e−x2 and ut(x,0)=0.
Solution
Solution. Here c=2. By D’Alembert’s formula with g=0:
u(x,t)=2f(x+2t)+f(x−2t)=2e−(x+2t)2+e−(x−2t)2.
This represents two Gaussian pulses traveling in opposite directions at speed 2. ■
## 9. Stability and Phase Plane Analysis
9.1 Autonomous Systems
For x′=f(x)A critical pointx∗ satisfies f(x∗)=0.
9.2 Linearization and Stability
Let A=Jf(x∗) be the Jacobian at the critical point. The eigenvalues of A Determine the local stability:
Eigenvalues of A
Type
Stability
Both real, negative
Stable node
Asymptotically stable
Both real, positive
Unstable node
Unstable
Real, opposite signs
Saddle point
Unstable
Complex, Re(λ)<0
Stable spiral
Asymptotically stable
Complex, Re(λ)>0
Unstable spiral
Unstable
Purely imaginary
Center
(Marginally) stable
9.3 Lyapunov Stability
Definition. A critical point x∗ is stable if for every ε>0There Exists δ>0 such that ∥x(0)−x∗∥<δ implies ∥x(t)−x∗∥<ε for all t>0.
It is asymptotically stable if it is stable and x(t)→x∗ as t→∞.
Theorem 9.1 (Lyapunov). If there exists a continuously differentiable function V (a Lyapunov Function) such that V(x∗)=0, V(x)>0 for x=x∗ And V˙≤0 in a neighbourhood of x∗Then x∗ is stable. If V˙<0 for x=x∗Then x∗ is asymptotically stable.
9.4 Worked Example: Linearization
Problem. Find and classify the critical points of x′=x−y, y′=x2+y2−1.
Solution
Solution. Set x′=0 and y′=0:
x−y=0⟹y=x
x2+x2−1=0⟹2x2=1⟹x=±1/2
Critical points: (1/2,1/2) and (−1/2,−1/2).
The Jacobian is J=(12x−12y).
At (1/2,1/2): J=(12−12).
tr(J)=1+2>0, det(J)=2+2=22>0.
τ2−4Δ=(1+2)2−82=3+22−82=3−62<0.
Complex eigenvalues with positive real part: unstable spiral.
At (−1/2,−1/2): J=(1−2−1−2).
tr(J)=1−2<0, det(J)=−2+2=0.
Wait, det(J)=(1)(−2)−(−1)(−2)=−2−2=−22<0.
Negative determinant: saddle point (unstable). ■
9.5 Phase Portraits for 2D Nonlinear Systems
For the nonlinear system x′=f(x)The Hartman-Grobman theorem States that near a hyperbolic critical point (one where the Jacobian has no eigenvalues on the Imaginary axis), the nonlinear phase portrait is topologically equivalent to the linearized one.
Procedure for sketching phase portraits:
Find all critical points by solving f(x)=0.
Compute the Jacobian J at each critical point.
Classify each critical point using the eigenvalue analysis from Section 4.9.
Sketch the local behaviour near each critical point.
Connect the local pictures using nullclines (x′=0 and y′=0 curves).
9.6 Limit Cycles and Poincaré-Bendixson
A limit cycle is an isolated closed periodic orbit. Limit cycles are inherently nonlinear Phenomena --- linear systems cannot have isolated closed orbits.
Theorem 9.2 (Poincaré-Bendixson). If a trajectory of a C1 planar system is confined to a Closed bounded region R that contains no critical points, then the trajectory approaches a closed Periodic orbit as t→∞.
Remark. The Poincaré-Bendixson theorem is specific to two dimensions. In three or more Dimensions, much more complex behaviour (chaos) is possible.
Example: Van der Pol oscillator. The equation
x′′+μ(x2−1)x′+x=0
With μ>0 has a unique stable limit cycle. This system models electrical circuits with Nonlinear resistance and arises in biology (cardiac rhythms, neuron firing).
9.7 Worked Example: Lotka-Volterra Analysis
Problem. Analyze the stability of the Lotka-Volterra system x′=x(2−y), y′=y(x−1).
Solution
Solution. Critical points: (0,0) and (1,2).
Jacobian: J=(2−yy−xx−1).
At (0,0): J=(200−1). Eigenvalues 2 and −1: saddle point (unstable).
At (1,2): J=(02−10). det(J)=2>0, tr(J)=0. Eigenvalues ±i2: center.
Remark. For the linearized system, the center is (marginally) stable. However, for the Nonlinear Lotka-Volterra system, the trajectories are actually closed orbits surrounding (1,2). This can be verified using the first integral H=x−lnx+2lny−yWhich is constant Along trajectories. ■
9.8 Competing Species
The competing species model is:
x′=x(r1−a11x−a12y),y′=y(r2−a21x−a22y)
Where ri>0 are growth rates and aij>0 are competition coefficients. The four critical Points are (0,0), (r1/a11,0), (0,r2/a22)And the coexistence point (x∗,y∗) where both x′ and y′ vanish.
The stability of the coexistence point determines whether both species survive. If a11a22>a12a21Coexistence is stable; otherwise, one species drives the other To extinction (competitive exclusion).
10. Common Pitfalls
:::caution Common Pitfall When using undetermined coefficients, always check whether your guess Overlaps with the homogeneous solution. For y′′−4y=e2xGuessing yp=Ae2x fails Because e2x satisfies the homogeneous equation. You must use yp=Axe2x instead. :::
:::caution Common Pitfall The Laplace transform of y′(t) is sY(s)−y(0)Not sY(s). The Initial conditions are built into the transform. Forgetting them leads to incorrect solutions. :::
:::caution Common Pitfall Separation of variables can miss solutions. When dividing by h(y) to Separate, check whether h(y)=0 gives any valid solutions. For example, solving y′=y2 by Separating gives y=−1/(x+C)But misses the solution y=0. :::
:::caution Common Pitfall The Fourier series of a function converges to the function only at points Of continuity. At jump discontinuities, it converges to the midpoint of the jump. The Gibbs Phenomenon causes overshoots near jumps that do not vanish as more terms are added. :::
:::caution Common Pitfall When solving PDEs by separation of variables, the boundary conditions Determine the eigenvalues. Using the wrong boundary conditions (e.g., Neumann instead of Dirichlet) Leads to a completely different set of eigenfunctions and eigenvalues. :::
:::caution Common Pitfall Not every first-order ODE can be solved analytically. Equations like y′=x2+y2 have no closed-form solution in terms of elementary functions. Numerical methods (Euler, Runge-Kutta) may be necessary. :::
:::caution Common Pitfall The linearization of a nonlinear system near a critical point is only Valid for hyperbolic critical points (no eigenvalues on the imaginary axis). If eigenvalues lie on The imaginary axis, the nonlinear system can behave very differently from its linearization. :::
:::caution Common Pitfall When computing the inverse Laplace transform, always check that the Partial fraction decomposition is correct before inverting term-by-term. A common error is Forgetting to include all powers of irreducible quadratic factors. :::
:::caution Common Pitfall For the Euler-Cauchy equation x2y′′+axy′+by=0Remember that xr with complex r=α±iβ gives solutions involving cos(βlnx) and sin(βlnx)Not cos(βx) and sin(βx). :::
:::caution Common Pitfall The Wronskian W(y1,y2) being zero at a single point does not Necessarily mean the solutions are linearly dependent. For linear ODEs with continuous coefficients, W≡0 everywhere or W=0 everywhere. Check Abel’s identity.
9.9 Worked Example: Lyapunov Function
Problem. Show that (0,0) is asymptotically stable for the system x′=−x−y3, y′=x3−y.
Solution
Solution. Critical point: −x−y3=0 and x3−y=0 gives x=0,y=0.
Choose the Lyapunov function V(x,y)=2x2+2y2. V(0,0)=0 and V>0 for (x,y)=(0,0).
V˙=∂x∂Vx′+∂y∂Vy′=x(−x−y3)+y(x3−y)
=−x2−xy3+x3y−y2=−x2−y2+xy(x2−y2)
This is not negative definite. Let us try V(x,y)=4x4+4y4:
V˙=x3(−x−y3)+y3(x3−y)=−x4−x3y3+x3y3−y4=−(x4+y4).
Since V˙=−(x4+y4)<0 for (x,y)=(0,0)The origin is asymptotically Stable by Lyapunov’s theorem. ■
9.10 Worked Example: Van der Pol Oscillator
Problem. Show that the Van der Pol equation x′′+μ(x2−1)x′+x=0 with μ>0 Has a unique limit cycle.
Solution
_Solution.* Write as a system: x′=y, y′=−x−μ(x2−1)y.
The only critical point is (0,0). The Jacobian at the origin is J=(0−11μ).
tr(J)=μ>0, det(J)=1>0, τ2−4Δ=μ2−4.
For 0<μ<2: complex eigenvalues with positive real part (unstable spiral). For μ≥2: two positive real eigenvalues (unstable node).
The origin is always unstable. To show existence of a limit cycle, we use a Liénard’s theorem Or construct a trapping region. Define
L(x)=x3/3−x and write the system as x′=y, y′=−x−μL′(x)y.
The function L(x) has zeros at x=±1. For μ>0The damping is negative for ∣x∣<1 (energy input) and positive for ∣x∣>1 (energy Dissipation). This creates a unique stable limit cycle that passes through x=±1.
A detailed proof requires constructing an annular region and applying the Poincaré-Bendixson Theorem (the inner boundary encloses the unstable origin; the outer boundary is chosen so that Trajectories point inward). ■
## 11. Problem Set
Problem 1 (Classification)
Classify the ODE y′′+xy′+exy=cosx by order, linearity, and homogeneity.
Solution
Solution. Second-order (highest derivative is y′′), linear (y, y′, y′′ appear linearly With coefficient functions of x only), nonhomogeneous (cosx=0). ■
If you get this wrong, revise: Section 1.2 (Classification of ODEs).