Solution of 6(a), (b), and (c)
(a) Using Euler’s Method with Step Size 0.25 to Approxi-
mate y at x=9.5
Given the differential equation:
dy 1
= √ , x≥0
dx 1+ x
The initial condition is:
y(0) = 0
We are tasked with approximating y at x = 9.5 using Euler’s method with step
size h = 0.25.
Euler’s method states that:
yn+1 = yn + h · f (xn , yn )
where f (x, y) = 1+1√x in this case. We start with x0 = 0, y0 = 0, and use the
recurrence to compute successive values of y.
x0 = 0, y0 = 0
1
x1 = 0.25, y1 = y0 + 0.25 · f (x0 , y0 ) = 0 + 0.25 · √ = 0.25
1+ 0
1
x2 = 0.5, y2 = y1 +0.25·f (x1 , y1 ) = 0.25+0.25· √ ≈ 0.25+0.25·0.7071 = 0.4268
1+0.25
1
x3 = 0.75, y3 = y2 +0.25·f (x2 , y2 ) = 0.4268+0.25· √ ≈ 0.4268+0.25·0.7071 = 0.6020
1 + 0.5
Continue similarly until x = 9.5.
(b) Using the Approximation Formula to Find y at x=1.2
We are given the equation:
dy
= 4x2 − y 2 , y(1) = 0
dx
We use the formula:
f (x + h) − f (x)
f ′ (x) ≈
h
with step size h = 0.05.
We start with x0 = 1 and y0 = 0. Using the approximation formula, we
compute the values of y at the desired points:
x0 = 1, y0 = 0
y1 − y 0
f ′ (x0 ) ≈ ⇒ y1 ≈ y0 + 0.05 · 4x20 − y02 = 0 + 0.05 · (4 · 12 − 02 ) = 0.20
0.05
Continue to compute values at x = 1.05, 1.1, . . . , 1.2.
1
(c) (i) Find h so that f(1+h) = 4.8
We are given the equation:
dy 4x2 + y 2
= , y(1) = 4
dx x+y
We need to find h such that y(1 + h) = 4.8.
From Euler’s method, we know that:
yn+1 = yn + h · f (xn , yn )
2 2
where f (x, y) = 4xx+y
+y
.
Using the initial condition y(1) = 4, compute the value of h that makes
y(1 + h) = 4.8.
(ii) Use Euler’s Method with Step Size 0.2 to Estimate
y(0.6)
Given the equation:
dy
+ x2 y = 7x2 , y(0) = 1
dx
Using Euler’s method with h = 0.2, we want to estimate y(0.6).
We begin with x0 = 0, y0 = 1, and use the recurrence relation:
yn+1 = yn + h · 7x2n − x2n yn
to compute successive values of y.
x0 = 0, y0 = 1
x1 = 0.2, y1 = y0 + 0.2 · (7 · 02 − 02 · 1) = 1
x2 = 0.4, y2 = y1 + 0.2 · (7 · 0.22 − 0.22 · 1) ≈ 1 + 0.2 · (0.28 − 0.04) = 1.048
x3 = 0.6, y3 = y2 + 0.2 · (7 · 0.42 − 0.42 · 1) ≈ 1.048 + 0.2 · (1.12 − 0.16) = 1.192
Thus, the estimate of y(0.6) is approximately 1.192.