CPT 03: Direction FieldsDifferential EquationsSeparable ODEsDefinition: Separable DEDefinition: Autonomous DESolutions to ODEsInvestigation 01Investigation 02Investigation 03Investigation 04Equilibrium SolutionsDefinition: Equilibrium SolutionStability of Equilibrium SolutionsDirection FieldsDefinition: Direction FieldsDefinition: Slope FieldsDefinition: Phase LinesSketching Slope FieldsInvestigation 05

**Author**: John J Weber III, PhD
**Corresponding Textbook Section**:

**Section 1.3**– Direction Fields

Expected Educational Results

**Objective 3–1**: I can distinguish between autonomous equations and non-autonomous equations.**Objective 3–2**: I can identify equilibrium solutions to ordinary differential equations.**Objective 3–3**: I can identify stability of equilibrium solutions to ordinary differential equations.**Objective 3–4**: I can sketch typical solution(s) to ordinary differential equations.**Objective 3–5**: I can use technology to sketch direction fields to ordinary differential equations.

**Separable DE**: A DE is **separable** if the DE,

**NOTE**: The derivative

**Autonomous DE**: A DE is **autonomous** if the DE is a function of only the dependent variable, i.e.,

**NOTE**: **All** autonomous equations are separable. The method of *partial fractions* is needed to solve autonomous equations.

**Definition**: A **solution** to an ODE are equations for curves that when substituted into the ODE results in a mathematically true statement.

Let

What does

describe about${y}^{{\textstyle \phantom{\rule{0.167em}{0ex}}}\prime}(x)$ . Explain.$y(x)$ Is

a linear function? Explain.$y(x)$

Let

$(0,0)$ $(-2,1)$ $(-1,1)$ $(-\frac{1}{2},-\frac{2}{3})$

From your knowledge of algebra, identify a function whose

From your knowledge of calculus, what do you know about the derivative of the function that you identified in the previous Investigation? Explain.

**Equilibrium Solution**: Equilibrium solutions are

An equilibrium solution is

**stable**if and only if solutions near them converge to .$y={y}_{i}$ An equilibrium solution is

**semi-stable**if:solutions near

converge to$y={y}_{i}$ for$y={y}_{i}$ and diverge for$y>{y}_{i}$ ,$y<{y}_{i}$ **OR**solutions near

converge to$y={y}_{i}$ for$y={y}_{i}$ and diverge for$y<{y}_{i}$ .$y>{y}_{i}$

An equilibrium solution is

**unstable**if and only if solutions are neither stable solutions nor semi-stable solutions.

**Direction Fields**: A **direction field** of a DE is a graphical representation, using vectors, of the solutions to a first-order DE.

**Slope Fields**: A **slope field** of a DE is a graphical representation, using line segments, of the solutions to a first-order DE.

**Phase Lines**: A **phase line** of an *autonomous DE* is a graphical representation of the equilibrium solutions to autonomous DEs.

The key to constructing direction fields and phase lines is to understand what

Is the DE autonomous? Explain.

Identify the equilibrium solutions to the DE. Explain.

Classify the equilibrium solutions as stable, semi-stable, or unstable. Explain.

Sketch several solutions to completely describe solutions to the DE. Explain.

Sketch the directions fields (and phase lines, where appropriate) for the following:

${y}^{{\textstyle \phantom{\rule{0.167em}{0ex}}}\prime}=y(y-2{)}^{2}(y-4)$ $y}^{{\textstyle \phantom{\rule{0.167em}{0ex}}}\prime}={y}^{3}-2{y}^{2$ ${y}^{{\textstyle \phantom{\rule{0.167em}{0ex}}}\prime}=\mathrm{sin}(y)$ $y}^{{\textstyle \phantom{\rule{0.167em}{0ex}}}\prime}=1-{e}^{y$ $y}^{{\textstyle \phantom{\rule{0.167em}{0ex}}}\prime}=(y-1{)}^{2}(y+2{)}^{2}{e}^{-2y$ ${y}^{{\textstyle \phantom{\rule{0.167em}{0ex}}}\prime}=x(y-3)(1+y)$ ${y}^{{\textstyle \phantom{\rule{0.167em}{0ex}}}\prime}={x}^{2}{y}^{2}(y-4)$ ${y}^{{\textstyle \phantom{\rule{0.167em}{0ex}}}\prime}=xy(y+2)(y-4)$

**Example**: Plot the slope field for

`xxxxxxxxxx`

1`(* Example, plot the slope field for y'=y(y-2)^2(y-4) *)`

2```
```

3`(* Plot the direction field *)`

4`VectorPlot[{1, y (y - 2)^2 (y - 4)}, {x, -10, 10}, {y, -10, 10}]`

5```
```

6`(* Typically, StreamPlot is easier to use *)`

7`StreamPlot[{1, y (y - 2)^2 (y - 4)}, {x, -10, 10}, {y, -10, 10}]`

8```
```

9`(* NOTE: the range of values for x and y can be changed as needed *) `

`1``# Import the needed packages`

2`import numpy as np`

3`import matplotlib.pyplot as plt`

4`#`

5`# Set up the mesh grid; change as needed`

6`Y, X = np.mgrid[-3:7:100j, -5:5:100j]`

7`#`

8`# Set up the autonomous DE as parametric equations`

9`# Change V as needed ** is exponentiation`

10`U = X`

11`V = Y*(Y-2)**2*(Y-4)`

12`#`

13`# Set up streamplot and plot`

14`fig, ax = plt.subplots()`

15`ax.streamplot(X, Y, U, V)`

16`#`

17`# Show the plot`

18`plt.show()`

**NOTE**: Later in the course, we will see how to create phase planes for multivariate DEs.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License [http://creativecommons.org/licenses/by-nc-sa/4.0/].

**Last Modified**: Sunday, 18 August 2020 21:51 EDT