Skip to main content

Thomas’ Calculus · Chapter 09 · Section 9.1

By Muhammad Abdullah Athar · SymPy Verified

Solutions, Slope Fields, and Euler's Method

❦

Read this page the way you would a book: first the notes, then the key ideas, then every worked example in order — each step explains not only what to do, but why it works.

Part One

Section Notes

❧

Section 9.1: Solutions, Slope Fields, and Euler's Method

Analyzing first-order differential equations qualitatively with slope fields and quantitatively with Euler's method.


1. Direction Fields and Isoclines

An isocline is a curve along which slopes are constant: f(x,y)=cf(x, y) = c.


2. Euler's Method Iteration

Starting from initial condition (x0,y0)(x_0, y_0) with step size h=Δxh = \Delta x:

xn+1=xn+hx_{n+1} = x_n + h yn+1=yn+h⋅f(xn,yn)y_{n+1} = y_n + h \cdot f(x_n, y_n)

Part Two

Key Ideas to Remember

2 essential statements for this section, each with a plain-words explanation.

Definition #1Sec 9.1

Direction (Slope) Field

dydx=f(x,y)\frac{dy}{dx} = f(x, y)

A visual geometric representation of a first-order differential equation consisting of short line segments with slope f(x, y) plotted on a grid of points (x, y) in the plane. Solution curves are tangent to these segments everywhere.

Conditions: f(x, y) is defined at grid points

In plain words: Allows qualitative analysis of solution behavior (asymptotes, stability, trends) without explicit algebraic solutions.

Remember — Solution curves flow through direction fields along local slope tangents.

Formula #2Sec 9.1

Euler's Numerical Method

yn+1=yn+f(xn,yn)Δx,xn+1=xn+Δxy_{n+1} = y_n + f(x_n, y_n) \Delta x, \quad x_{n+1} = x_n + \Delta x

A step-by-step numerical approximation technique for initial value problems that marches forward along tangent lines with step size Delta x.

Conditions: Delta x is a small positive step size

In plain words: First-order numerical method with local truncation error O((Delta x)^2) and global error O(Delta x).

Remember — Next y = current y + (slope)(step size).

Part Three

Worked Examples

5 exercises, solved in full. Every answer has been checked symbolically with SymPy before printing.

Example 01(Section 9.1, Exercise 1)

Warm-up

Problem. Use Euler's method with step size Delta x = 0.1 to approximate y(0.2) for the initial value problem dy/dx = x + y with y(0) = 1.

Step-by-Step Derivation (2 steps)

1

First Step: From x_0 = 0 to x_1 = 0.1

x0=0,  y0=1  ⟹  f(x0,y0)=0+1=1;y1=y0+f(x0,y0)Δx=1+1(0.1)=1.1x_0 = 0, \; y_0 = 1 \implies f(x_0, y_0) = 0 + 1 = 1; \quad y_1 = y_0 + f(x_0, y_0)\Delta x = 1 + 1(0.1) = 1.1

Evaluate slope at (0, 1) and advance by Delta x = 0.1.

Why this works: First Euler iteration.
2

Second Step: From x_1 = 0.1 to x_2 = 0.2

f(x1,y1)=0.1+1.1=1.2;y2=y1+f(x1,y1)Δx=1.1+1.2(0.1)=1.1+0.12=1.22f(x_1, y_1) = 0.1 + 1.1 = 1.2; \quad y_2 = y_1 + f(x_1, y_1)\Delta x = 1.1 + 1.2(0.1) = 1.1 + 0.12 = 1.22

Evaluate slope at (0.1, 1.1) and advance to x = 0.2.

Why this works: Second Euler iteration.

Answer: y(0.2)≈1.22y(0.2) \approx 1.22

✓ Verified by SymPy CAS

Example 02(Section 9.1, Exercise 2)

Warm-up

Problem. Verify that y = 2 e^(x^2) - 1 is a solution to dy/dx - 2xy = 2x with y(0) = 1.

Step-by-Step Derivation (3 steps)

1

Compute dy/dx

dydx=2ex2(2x)−0=4xex2\frac{dy}{dx} = 2 e^{x^2} (2x) - 0 = 4x e^{x^2}

Differentiate y with respect to x using chain rule.

Why this works: Derivative computation.
2

Substitute into Left Side of ODE

dydx−2xy=4xex2−2x(2ex2−1)=4xex2−4xex2+2x=2x\frac{dy}{dx} - 2xy = 4x e^{x^2} - 2x(2e^{x^2} - 1) = 4x e^{x^2} - 4x e^{x^2} + 2x = 2x

Expression simplifies to 2x, matching the right side.

Why this works: Differential equation satisfaction.
3

Verify Initial Condition

y(0)=2e0−1=2(1)−1=1y(0) = 2e^0 - 1 = 2(1) - 1 = 1

Initial condition y(0) = 1 holds.

Why this works: Initial value problem verification.

Answer: y(x)=2ex2−1 satisfies the differential equation and initial conditiony(x) = 2e^{x^2} - 1 \text{ satisfies the differential equation and initial condition}

✓ Verified by SymPy CAS

Example 03(Section 9.1, Exercise 3)

Core practice

Problem. Find the equations of the isoclines for dy/dx = y - x^2 for slopes c = 0, c = 1, and c = -1.

Step-by-Step Derivation (2 steps)

1

Set Differential Expression Equal to Constant c

y−x2=c  ⟹  y=x2+cy - x^2 = c \implies y = x^2 + c

Isoclines are the level curves of the slope function.

Why this works: Definition of an isocline.
2

Substitute Values of c

c=0  ⟹  y=x2;c=1  ⟹  y=x2+1;c=−1  ⟹  y=x2−1c = 0 \implies y = x^2; \quad c = 1 \implies y = x^2 + 1; \quad c = -1 \implies y = x^2 - 1

A family of vertically shifted parabolas.

Why this works: Specific isocline curves.

Answer: c=0:y=x2;c=1:y=x2+1;c=−1:y=x2−1c = 0: y = x^2; \quad c = 1: y = x^2 + 1; \quad c = -1: y = x^2 - 1

✓ Verified by SymPy CAS

Example 04(Section 9.1, Exercise 4)

Warm-up

Problem. Use Euler's method with step size h = 0.5 to approximate y(1) for dy/dx = -2y with y(0) = 3.

Step-by-Step Derivation (2 steps)

1

First Step: x = 0 to x = 0.5

y1=y0+h(−2y0)=3+0.5(−2⋅3)=3−3=0y_1 = y_0 + h(-2y_0) = 3 + 0.5(-2 \cdot 3) = 3 - 3 = 0

Advance one step.

Why this works: Euler method step.
2

Second Step: x = 0.5 to x = 1.0

y2=y1+h(−2y1)=0+0.5(0)=0y_2 = y_1 + h(-2y_1) = 0 + 0.5(0) = 0

At y = 0, slope is zero.

Why this works: Next Euler iteration.

Answer: y(1)≈0y(1) \approx 0

✓ Verified by SymPy CAS

Example 05(Section 9.1, Exercise 5)

Core practice

Problem. For dy/dx = y with y(0) = 1, compare Euler's approximation y_n at x = 1 using n steps with the exact value e.

Step-by-Step Derivation (3 steps)

1

Derive General Step Formula

h=1n,yk+1=yk+hyk=yk(1+h)=yk(1+1n)h = \frac{1}{n}, \quad y_{k+1} = y_k + h y_k = y_k(1 + h) = y_k\left(1 + \frac{1}{n}\right)

Each step multiplies current value by (1 + 1/n).

Why this works: Inductive recurrence.
2

Evaluate After n Steps

yn=y0(1+1n)n=(1+1n)ny_n = y_0 \left(1 + \frac{1}{n}\right)^n = \left(1 + \frac{1}{n}\right)^n

Since y_0 = 1.

Why this works: Closed form for Euler's approximation.
3

Take Limit as n -> oo

lim⁡n→∞(1+1n)n=e\lim_{n \to \infty} \left(1 + \frac{1}{n}\right)^n = e

Recovers the Euler definition of the natural base e.

Why this works: Convergence of Euler's method.

Answer: yn=(1+1n)n→e as n→∞y_n = \left(1 + \frac{1}{n}\right)^n \to e \text{ as } n \to \infty

✓ Verified by SymPy CAS