MathLab with Mr. Ahmed

MathLab with Mr. Ahmed is a math learning website by Ahmed Amasha, a mathematics teacher teaching the American curriculum. Explore Algebra 2, Precalculus, Calculus, and SAT and PSAT Math Prep through lessons, focused practice and printable resources.

MathLabwith Mr. Ahmed
Differential Equations

6.1 Slope Fields and Euler’s Method

Focus on read a slope field, euler’s method, verify a proposed solution.

Free preview Explore the lesson before creating an account.

Play games for this section

Before you solve

Ideas in this lesson

Idea 1 of 3

Read a slope field

Evaluate the differential equation’ss right-hand side at a point to obtain the direction of its tangent segment.

Worked example 1

For y′=x+yy' = x + y, find the slope of the field segment at (1,2)(1, 2).
  1. m=x+ym = x + y
  2. m(1,2)=1+2=3m(1, 2) = 1 + 2 = 3

Answer: 33

Worked example 2

For y′=x−yy' = x - y, find the slope of the field segment at (2,3)(2, 3).
  1. m=x−ym = x - y
  2. m(2,3)=2−3=−1m(2, 3) = 2 - 3 = -1

Answer: −1-1

Idea 2 of 3

Euler’s Method

Advance by yn+1=yn+hf(xn,yn)y_{n+1} = y_{n} + h f(x_{n}, y_{n}), using the old point’ss slope for each step.

Worked example 1

Use Euler’ss Method with h=0.1h = 0.1 for y′=x+y,y(0)=2y' = x + y, y(0) = 2. Estimate y(0.1)y(0.1).
  1. yn+1=yn+h(xn+yn)y_{n+1} = y_{n} + h(x_{n} + y_{n}).
  2. At x=0.1,y=115≈2.2x = 0.1, y = \dfrac{11}{5} \approx 2.2.

Answer: 115≈2.2\dfrac{11}{5} \approx 2.2

Worked example 2

Use Euler’ss Method with h=0.1h = 0.1 for y′=x+y,y(0)=3y' = x + y, y(0) = 3. Estimate y(0.2)y(0.2).
  1. yn+1=yn+h(xn+yn)y_{n+1} = y_{n} + h(x_{n} + y_{n}).
  2. At x=0.1,y≈3.3x = 0.1, y \approx 3.3.
  3. At x=0.2,y=9125≈3.64x = 0.2, y = \dfrac{91}{25} \approx 3.64.

Answer: 9125≈3.64\dfrac{91}{25} \approx 3.64

Idea 3 of 3

Verify a proposed solution

Substitute both the function and its derivative into the equation, then check the initial condition.

Worked example 1

The function y=y = Ce 2x^{2x} solves y′=2yy' = 2y. If y(0)=1y(0) = 1, find CC.
  1. y′=2y' = 2 Ce 2x=2y^{2x} = 2y
  2. y(0)=C=1y(0) = C = 1
  3. C=1C = 1

Answer: 11

Worked example 2

The function y=y = Ce 3x^{3x} solves y′=3yy' = 3y. If y(0)=2y(0) = 2, find y(1)y(1).
  1. y′=3y' = 3 Ce 3x=3y^{3x} = 3y
  2. y(0)=C=2y(0) = C = 2
  3. y(1)=2e3=2e3≈40.17y(1) = 2e^{3} = 2e^{3} \approx 40.17

Answer: 2e3≈40.172e^{3} \approx 40.17

Resource alignment: Larson & Edwards, Calculus of a Single Variable, Tenth Edition, §6.1,p6.1, p. 398398. Explanations, diagrams and numerical practice variants are original MathLab content aligned to this section.