EE 203: Engineering Models
Fall 2025
Lecture 5 – Direction Fields
Hassan Mohy-ud-Din, PhD
Initial Value Problem
𝑑𝑛 𝑦
Solve (Normal form): = 𝑓(𝑥, 𝑦, 𝑦 ′ , 𝑦 ′′ , ⋯ , 𝑦 𝑛−1 ), 𝑓 real-valued and
𝑑𝑥 𝑛
continuous
Constraints/Conditions: 𝑦 𝑥0 = 𝑦0 , 𝑦 ′ 𝑥0 = 𝑦1 , ⋯ , 𝑦 (𝑛−1) 𝑥0 = 𝑦𝑛−1
where 𝑦0 , 𝑦1 , ⋯ , 𝑦𝑛−1 are arbitrary real constants
Initial conditions: Values of 𝑦 𝑥 and its first 𝑛 − 1 derivatives at a single point
𝑥0
𝑑𝑛 𝑦
𝑛-th order IVP: Solve: = 𝑓 𝑥, 𝑦, 𝑦 ′ , 𝑦 ′′ , ⋯ , 𝑦 𝑛−1
𝑑𝑥 𝑛
Subject to: 𝑦 𝑥0 = 𝑦0 , 𝑦 ′ 𝑥0 = 𝑦1 , ⋯ , 𝑦 (𝑛−1) 𝑥0 = 𝑦𝑛−1
What are we going to learn here?
Is there a non-analytical way of solving DEQs?
More qualitative understanding of the properties of the solutions:
𝜕𝑓
– Continuity of 𝑓(𝑥, 𝑦) and tells us about existence & uniqueness
𝜕𝑦
of the solution
– Behavior of a solution near a certain point
– How does a solution behave as 𝑥 ⟶ ∞
These questions can be answered if 𝑓 depends solely on the 𝑦
– Why?
– We already saw this in the existence and uniqueness case
Slope
Given: 𝑦 = 𝑦 𝑥 a differentiable function
𝑑𝑦
Derivative: with respect to (a single) independent variable (Why?)
𝑑𝑥
Slope: Derivative gives slopes of tangent lines at points on its graph
𝑑𝑦
Resulting DEQ: = 𝑓(𝑥, 𝑦)
𝑑𝑥
Properties: Solution 𝑦 = 𝑦(𝑥) is necessarily differentiable on interval 𝐼
Hence, also continuous on interval 𝐼
Slope function: The function 𝑓(𝑥, y) in normal form aka rate function
Slope – Geometric Perspective
Solution curve: Continuous on the interval of definition 𝐼
Slope: At a particular point (𝑥, 𝑦 𝑥 ) is the tangent at that
particular point
Derivative: Slope is the value of first derivative at (𝑥, 𝑦 𝑥 )
𝑑𝑦
𝑑𝑥 (𝑥,𝑦 𝑥 )
This quantity can be readily obtained from slope function 𝑓(𝑥, 𝑦)
Lineal element: 𝑓(𝑥, 𝑦(𝑥)) represent slope of line segment or lineal element
Example # 2
𝑑𝑦
DEQ: Given = 0.2𝑥𝑦
𝑑𝑥
Slope function: 𝑓(𝑥, 𝑦) = 0.2𝑥𝑦 e.g. Slope of lineal element is 𝑓 2, 3 = 1.2
Direction Fields
𝑑𝑦
Slope function: = 𝑓(𝑥, 𝑦)
𝑑𝑥
Populate the grid: Use the slope function to draw (small) lineal elements at
each point (𝑥, 𝑦) on the grid
Direction field: Collection of all line elements aka slope field of the DEQ
Qualitative insight: Direction field gives the appearance or shape of family of
solution curves of the DEQ
Regions of unusual behavior
Solution curve follows the flow pattern of the field
Example # 3 – Direction Field
𝑑𝑦
DEQ: Given = 0.2𝑥𝑦
𝑑𝑥
Grid: 𝑥 = −5: 1: 5 and 𝑦 = −5: 1: 5
Arrows: Encodes sign of slope, direction of flow
Quadrant 1: 𝑓 𝑥, 𝑦 > 0 for 𝑥 > 0 and 𝑦 > 0
Quadrant 2: 𝑓 𝑥, 𝑦 < 0 for 𝑥 < 0 and 𝑦 > 0
Quadrant 3: 𝑓 𝑥, 𝑦 > 0 for 𝑥 < 0 and 𝑦 < 0
Quadrant 4: 𝑓 𝑥, 𝑦 < 0 for 𝑥 > 0 and 𝑦 < 0
Arrows: We conclude as 𝑥 → ±∞, 𝑦 → ∞
Example # 3 – Solution Curves
Example # 3 – Algebraic Approach
𝑑𝑦
DEQ: Given = 0.2𝑥𝑦
𝑑𝑥
2
Explicit solution: 𝑦 = ϕ 𝑥 = 𝑒 0.1𝑥 for 𝑥 ∈ −∞, ∞
Verify solution: 𝐹 𝑥, ϕ(𝑥), ϕ′ (𝑥) = 0, ∀ 𝑥 ∈ 𝐼 or LHS = RHS
2
One-parameter family (explicit): 𝑦 = ϕ 𝑥 = 𝑐𝑒 0.1𝑥 for 𝑥 ∈ −∞, ∞
Particular (trivial) solution: 𝑦𝑝 = ϕ 𝑥 |𝑐=0 = 0 for 𝑥 ∈ −∞, ∞
Example # 4 – Direction Field
𝑑𝑦 3
IVP: Given = sin 𝑦 and 𝑦 0 = −
𝑑𝑥 2
𝜕𝑓
Slope function: 𝑓 𝑥, 𝑦 = sin 𝑦 and = cos 𝑦
𝜕𝑦
Arrows: Does the solution exist? Unique?
Obvious ones: sin 𝑦 |0,−𝜋 = 0
Hence the lineal elements have
slope 0
Sign of the First Derivative
𝑑𝑦
Given: = 𝑓(𝑥, 𝑦) where 𝑦 = 𝑦(𝑥) is a solution
𝑑𝑥
Property: 𝑦 = 𝑦(𝑥) is differentiable for all 𝑥 ∈ 𝐼
𝑑𝑦
Increasing function: > 0, ∀ 𝑥 ∈ 𝐼
𝑑𝑥
𝑑𝑦
Decreasing function: < 0, ∀ 𝑥 ∈ 𝐼
𝑑𝑥
Isocline (from Iso-inclination)
𝑑𝑦
Given: = 𝑓(𝑥, 𝑦) where 𝑦 = 𝑦(𝑥) is a solution
𝑑𝑥
Family of curves: 𝑓 𝑥, 𝑦 = 𝑐 where 𝑐 is a constant
Lineal elements: Slope of lineal elements on this family have identical slope
Isoclines: Lineal elements on a specific isocline 𝑓 𝑥, 𝑦 = 𝑐1 all have same slope
Autonomous First-order DEQs
𝑛th order ODE: 𝐹 𝑥, 𝑦, 𝑦 ′ , 𝑦 ′′ , ⋯ , 𝑦 (𝑛) = 0
𝑑𝑛 𝑦
Normal form: = 𝑓(𝑥, 𝑦, 𝑦 ′ , ⋯ , 𝑦 𝑛−1 ) where 𝑓 is real-valued & continuous
𝑑𝑥 𝑛
1st order ODE: 𝐹 𝑥, 𝑦, 𝑦 ′ = 0
𝑑𝑦
Normal form: = 𝑓(𝑥, 𝑦)
𝑑𝑥
Self-driving ODE: 𝐹 𝑦, 𝑦 ′ = 0 not guided by the independent variable
𝑑𝑦
Corresponding Normal form: = 𝑓(𝑦)
𝑑𝑥
𝑑𝑦
Non-autonomous ODE: = 0.2𝑥𝑦 ≡ 𝑓(𝑥, 𝑦) i.e. slope function depends on 𝑥
𝑑𝑥
Examples of Autonomous DEQs (from Lecture 3)
𝑑𝑃
Population growth: Solve DEQ: = 𝑘𝑃 i.e. 𝑃(𝑡) = ? with 𝑃(0) = 𝑃0
𝑑𝑡
𝑑𝐴
Radioactive decay: Solve DEQ: = 𝑘𝐴 i.e. 𝐴(𝑡) = ? with 𝐴(0) = 𝐴0
𝑑𝑡
𝑑𝑆
Capital growth: Solve DEQ: = 𝑟𝑆 i.e. 𝑆(𝑡) = ? with 𝑆(0) = 𝑆0
𝑑𝑡
𝑑𝑥
Spread of disease: Solve DEQ: = 𝑘𝑥(𝑛 + 1 − 𝑥) i.e. 𝑥(𝑡) = ? with 𝑥 0 = 1
𝑑𝑡
Pharmacokinetics: Solve DEQs:
𝑑𝐶𝐹+𝑁𝑆
= 𝐾1 𝐶𝑝 𝑡 + 𝑘4 𝐶𝑆𝑃 𝑡 − (𝑘2 + 𝑘3 )𝐶𝐹+𝑁𝑆 (𝑡)
𝑑𝑡
𝑑𝐶𝑆𝑃
= 𝑘3 𝐶𝐹+𝑁𝑆 𝑡 − 𝑘4 𝐶𝑆𝑃 (𝑡)
𝑑𝑡
i.e. 𝐶𝐹+𝑁𝑆 (𝑡) = ? and 𝐶𝑆𝑃 (𝑡) = ?
Critical Points of Autonomous First-order DEQs
Self-driving ODE: 𝐹 𝑦, 𝑦 ′ = 0 not guided by the independent variable
𝑑𝑦
Corresponding Normal form: = 𝑓(𝑦)
𝑑𝑥
Critical point: Zero of the slope function i.e. 𝑓 𝑐 = 0
aka equilibrium point or stationary point
can be infinitely many critical points
Possible solution: Is 𝑦 𝑥 = 𝑐 a solution?
Rule: 𝑐 is critical point ⟹ 𝑦 𝑥 = 𝑐 is a constant solution of autonomous DEQ
Equilibrium solution: is the constant solution of an autonomous DEQ
Equilibria are the only constant solutions
Increasing or Decreasing on 𝐼
𝑑𝑦
Non-constant solutions, 𝑦 = 𝑦(𝑥): Algebraic sign of the derivative
𝑑𝑥
𝑑𝑦
Increasing function: > 0, ∀ 𝑥 ∈ 𝐼
𝑑𝑥
𝑑𝑦
Decreasing function: < 0, ∀ 𝑥 ∈ 𝐼
𝑑𝑥
Constant solutions, 𝑦(𝑥) = 𝑐: Algebraic sign of 𝑓(𝑦) on the 𝑦 axis
Increasing function: 𝑓(𝑦) > 0, ∀ y ∈ 𝐼
Decreasing function: 𝑓 𝑦 < 0, ∀ y ∈ 𝐼
Example # 5 – Critical Points
𝑑𝑃
DEQ: Given = 𝑃(𝑎 − 𝑏𝑃) where 𝑎, 𝑏 > 0
𝑑𝑡
Autonomous: Yes or No?
𝑎
Critical points: 𝑓 𝑃 = 𝑃 𝑎 − 𝑏𝑃 = 0 ⟹ 𝑃 = 0 or 𝑃 =
𝑏
𝑎
Equilibrium solutions: 𝑃 𝑡 = 0 and 𝑃 𝑡 =
𝑏
Example # 5 – Phase Portrait
The previous table helps us create a 1-D phase portrait of the DEQ. The
vertical line is called phase line
Example # 5 – Phase Portrait & Solution Curves
Bounded BELOW
BOUNDED
Bounded ABOVE
References
Material borrowed from
• G. Zill & M. R. Cullen, Differential Equations with Boundary-Value Problems, 7th edition,
Cengage Learning, 2008