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.
Before you solve
Ideas in this lesson
Idea 1 of 3
Read a slope field
Evaluate the differential equation’s right-hand side at a point to obtain the direction of its tangent segment.
Worked example 1
For y′=x+y, find the slope of the field segment at (1,2). - m=x+y
- m(1,2)=1+2=3
Answer: 3
Worked example 2
For y′=x−y, find the slope of the field segment at (2,3). - m=x−y
- m(2,3)=2−3=−1
Answer: −1
Idea 2 of 3
Euler’s Method
Advance by yn+1=yn+hf(xn,yn), using the old point’s slope for each step.
Worked example 1
Use Euler’s Method with h=0.1 for y′=x+y,y(0)=2. Estimate y(0.1). - yn+1=yn+h(xn+yn).
- At x=0.1,y=511≈2.2.
Answer: 511≈2.2
Worked example 2
Use Euler’s Method with h=0.1 for y′=x+y,y(0)=3. Estimate y(0.2). - yn+1=yn+h(xn+yn).
- At x=0.1,y≈3.3.
- At x=0.2,y=2591≈3.64.
Answer: 2591≈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= Ce 2x solves y′=2y. If y(0)=1, find C. - y′=2 Ce 2x=2y
- y(0)=C=1
- C=1
Answer: 1
Worked example 2
The function y= Ce 3x solves y′=3y. If y(0)=2, find y(1). - y′=3 Ce 3x=3y
- y(0)=C=2
- y(1)=2e3=2e3≈40.17
Answer: 2e3≈40.17
Resource alignment: Larson & Edwards, Calculus of a Single Variable, Tenth Edition, §6.1,p. 398. Explanations, diagrams and numerical practice variants are original MathLab content aligned to this section.