Exercise 1.1: X X On The Same Set of Axes. X X
Exercise 1.1: X X On The Same Set of Axes. X X
Exercise 1.1: X X On The Same Set of Axes. X X
1
1. Show equation x7 + 4 = 0 has a root in the interval (−2, 0).
2. Find all the interval(s) contains the root(s) of the equation sin(x) =
x2 − 2.
√
3. Sketch the function y = x2 − 1 and y = x on the same set of √ axes.
Hence, deduce the interval(s) where the solution of the equation x −
x2 + 1 = 0 located.
4. Sketch the function f (x) = x − 3 and g(x) = ln x, x > 0 and find the
interval(s) where the root(s) of the equation x − 3 − ln x = 0 lie.
a. f (x) = x sin x − x3 + 1, x0 = 1
b. f (x) = x2 − 3 − ln x, x0 = 2.0
8. Sketch the function f (x) = x3 −x2 +3 and confirm that there is a simple
root between x = −2 and x = −1. Obtain the value of estimation,
correct to 2 d.p.
1
2. Find all the interval(s) contains the root(s) of the equation sin(x) =
x2 − 2.
Solution
Let, g(x) = sin x and h(x) = x2 − 2.
2
1.5
1 x2 − 2
0.5
sin x
−5 −4 −3 −2 −1 1 2 3 4 5
−0.5
−1
−1.5
−2
Graphs of g(x) and h(x) are intersect in the interval (−2, −1) and (1, 2).
√
3. Sketch the function y = x2 − 1 and y = x on the same set of √ axes.
Hence, deduce the interval(s) where the solution of the equation x −
x2 + 1 = 0 located.
Solution √
Let, g(x) = x and h(x) = x2 − 1.
2
2
1.5 x2 − 1
√
1 x
0.5
−3 −2 −1 1 2 3
−0.5
−1
−1.5
−2
Graphs of g(x) and h(x) are intersect in the interval (1, 2).
4. Sketch the function f (x) = x − 3 and g(x) = ln x, x > 0 and find the
interval(s) where the root(s) of the equation x − 3 − ln x = 0 lie.
Solution
Let, g(x) = ln x and h(x) = x − 3.
2
ln x
−3 −2 −1 1 2 3 4 5
−1.5
x−3
−5
Graphs of g(x) and h(x) are intersect in the interval (0, 1), (4, 5).
5. Use Newton’s Method to determine x2 for the given function and given
3
value of x0 .
a. f (x) = x sin x − x3 + 1, x0 = 1
Solution
f ′ (x) = x cos x + sin x − 3x2
0.8415
x1 = 1 − −1.6182 = 1.52
−0.9938
x2 = 1.52 − −5.8553 = 1.35
b. f (x) = x2 − 3 − ln x, x0 = 2
Solution
f ′ (x) = 2x − x1
x1 = 2 − 0.3069
3.5
= 1.9123
x2 = 1.912 − 0.00753.3
= 1.910
Solution
f (y) = y 3 − 5y + 1
f ′ (y) = 3y 2 − 5
y0 = 2
y1 = 2 − −1 7
= 2.1429
y2 = 2.1429 − 0.12574
8.77606
= 2.1286
0.00156
y3 = 2.1286 − 8.59281 = 2.1284
4
correct to 2 d.p.
Solution
Rewrite f (x) into g(x) = x3 and h(x) = x2 − 3.
2
x3
x2 − 3
−3 −2 −1 1 2 3
−1.5
f (x) = x3 − x2 + 3
f ′ (x) = 3x2 − 2x
x0 = −1.5
From the grph, we chose x0 = −1.5seems close to the root.
x1 = 1.5 − −2.625
9.75
= −1.2308
−0.3794
x2 = −1.2308 − 7.006 = −1.1767
x3 = −1.1767 − −0.0139
6.5073
− 1.1746
−0.0003
x4 = −1.1746 − 6.4883 = −1.1746
Exercise 1.2
1. Find the first two approximations using Euler’s method for the initial
dy
value problem dx = y + 2 cos x, y(1) = 2, starting at x = 1 with step
size h = 0.1. Correct to 3 decimal places.
2. Use Euler’s method with step size 0.2 to estimate y(1.0) , where is the
solution of y ′ = y + xy, y(0) = 1. Correct to 3 decimal places.
5
3. Given the initial value problem dy
dt
= 3 − 2t − 0.5y with y(0) = 1,
approximate the value of y(0.5). Use 5 steps. Correct to 3 decimal
places.
dy
4. Given the differential equation dx = yt with y(1) = 2 estimate y(1.5)
using Euler’s method with five equal steps. Correct to 3 decimal places.
dy
5. Given the differential equation dx = x + 2 and y(0) = 3. Find an
approximation for y(1) by using Euler’s method with two equal steps.
Correct to 2 decimal places.
dy 1
6. Given the differential equation dx = x+2 and y(0) = 1. Find an approx-
imation of y(1) using Euler’s method with step size, h = 0.5. Correct
to 2 decimal places.
dy
7. The curve passing through (2, 0) satifies the differential equation dx =
4x + y. Find an approximation to y(3) using Euler’s method with step
size, h = 0.2. Correct to 3 decimal places.
8. Assume that f and f ′ have the values given in the table. Use Euler’s
method with two equal steps to approximate the value of f (4.4). Cor-
rect to 3 decimal places.
x 4 4.2 4.4
f ′ (x) -0.5 -0.3 -0.1
f (x) 2
2. Use Euler’s method with step size 0.2 to estimate y(1.0) , where is the
solution of y ′ = y + xy, y(0) = 1.
6
solution
x f’(x) f(x)
0 1 1
0.2 1.2 1.44
0.4 1.488 2.0832
0.6 1.9046 3.0474
0.8 2.5141 4.5254
1.0 3.4192
4. Given dy
dt
= yt with y(1)=2, estimate the value of y(1.5) using 5 steps.
solution
h = 0.1
t f(t) f’(t)
1 2 0.5
1.1 2.05 0.5366
1.2 2.1037 0.5704
1.3 2.1607 0.6017
1.4 2.2209 0.6304
1.5 2.2839
dy
5. Given the differential equation dx = x + 2 and y(0) = 3. Find an ap-
proximation for y(1) by using Euler’s method with two equal steps.
solution
x f(x) f’(x)
0 3 2
0.5 4 2.5
1 5.25
7
dy 1
6. Given the differential equation dx = x+2 and y(0) = 1. Find an ap-
proximation of y(1) using Euler’s method with step size, h = 0.5.
solution
x f(x) f’(x)
0 1 0.5
0.5 1.25 0.4
1 1.45
dy
7. The curve passing through (2, 0) satifies the differential equation dx =
4x + y. Find an approximation to y(3) using Euler’s method with step
size, h = 0.2.
solution
x f(x) f’(x)
2 0 8
2.2 1.6 10.4
2.4 3.68 13.28
2.6 6.336 16.736
2.8 9.6832 20.8832
3.0 13.8598
8. Assume that f and f ′ have the values given in the table. Uue Euler’s
method with two equal steps to approximate the value of f (4.4).
solution
x 4 4.2 4.4
′
f (x) -0.5 -0.3 -0.1
f (x) 2 1.9 1.84
8
2. Sketch the function f (x) = x3 − x2 + 3 and confirm that there is a
simple root between x = −2 and x = −1. Use x0 = −2 as an initial
estimate to obtain the value to 2 d.p.
4. The equation 2x2 −3+ex = 0 has two solutions x1 and x2 . Use Newton-
Raphson method to approximate the solution with the following initial
extimation.
a. x0 = −1
b. x0 = 1
c. x0 = 0
√
5. f (x) = x3 + 2x − 1 + 3x − 10.
7. For the initial condition y(0) = 3, using Euler’s method with a step
size h = 0.1 to estimate the value of y at x = 0.5 for y ′ − 2xy = 1.
8. Find the first two approximations using Euler’s method for the differ-
dy
ential equation dx = 2y, y(1) = 2, starting at x = 1 with h = 0.1.
9
Answer Review Exercise
1. By sketching the function f (x) = x − 1 − sin x show that there is a
simple root near x = 2. Use two iterations of the Newton-Raphson
method to obtain a better estimate of the root.
solution
Rewrite f (x) into g(x) = sin x and h(x) = x − 1.
sin x
−3 −2 −1 1 2 3
x−1
−1.5
Graphs of g(x) and h(x) are intersect in the interval (1, 2). So, there
is a root in this interval.
f (x) = x − 1 − sin x
f ′ (x) = 1 − cos x
n x f (x) f ′ (x)
0 2 0.0907 1.4161
1 1.9360 0.0019 1.3571
2 1.9346 0.0000
x2 = 1.9346
solution
Rewrite f (x) into g(x) = x3 and h(x) = x2 − 3.
10
2
x3
−3 −2 −1 1 2 3
x2 − 3
−1.5
Graphs of g(x) and h(x) are intersect in the interval (−2, −1). So,
there is a root in this interval.
f (x) = x3 − x2 + 3
f ′ (x) = 3x2 − 2x
n x f (x) f ′ (x)
0 -2 -9 16
1 -1.4375 -2.0369 9.0742
2 -1.2130 -0.2564 6.8404
3 -1.1756 -0.0065 6.4969
4 -1.1746 0.0000
root is −1.17.
n x f (x) f ′ (x)
0 -0.7 0.5363 -17.856
1 -0.6700 0.0178 -16.6812
2 -0.6689 0.0000
11
When f (p) = 0.0000 then p is a root.So, -0.6689 is a root.
n x f (x) f ′ (x)
0 0.7 -2.2357 9.976
1 0.9241 0.6632 16.2836
2 0.8834 0.0273 14.9574
3 0.8816 0.0000
0.8816 is another root
4. The equation 2x2 −3+ex = 0 has two solutions x1 and x2 . Use Newton-
Raphson method to approximate the solution with the following initial
extimation.
solution
f (x) = 2x2 − 3 + ex
f ′ (x) = 4x + ex
a. x0 = −1
n x f (x) f ′ (x)
0 -1 -0.6321 -3.6321
1 -1.1740 0.0658 -4.3870
2 -1.1590 0.0005 -4.3223
3 -1.1589 0.0000
Root=-1.1589
b. x0 = 1
n x f (x) f ′ (x)
0 1 1.7183 6.7183
1 0.7442 0.2126 5.0818
2 0.7024 0.0053 4.8282
3 0.7013 0.0000
Root=0.7013
c. x0 = 0
12
n x f (x) f ′ (x)
0 0 -2 1
1 2 12.3891 15.3891
2 1.1949 3.1592 8.0831
3 0.8041 0.5290 5.4512
4 0.7073 0.0289 4.8575
5 0.7013 0.0001 4.8217
6 0.7013
Root=0.7013
Remark: From this exercise, you can see that, if correctly choose
an initial, we can obtain the root with less steps.
√
5. f (x) = x2 + 2x − 1 + 3x − 10.
solution
√
a. f (x) = x2 + 2x −q 1 + 3x − 10
3
f (1.7) = (1.7) + 2(1.7) − 1 + 3(1.7) − 10 = −0.1661 < 0
q
f (1.8) = (1.8)3 + 2(1.8) − 1 + 3(1.8) − 10 = 0.5374 > 0
Since f (1.7) < 0 and f (1.8) > 0, so there is a root in the interval
(1.7, 1.8).
b. f ′ (x) = 2x + √ 1
2x−1
+3
n x f (x) f ′ (x)
0 1.75 0.1833 7.0714
c.
1 1.7241 0.0016 7.0282
2 1.7239 0.0000
13
6. Using Euler’s method with stepsize of h = 0.25, find an approximate
dy
value of y(1), given that dx = x + y and y(0)=1.
solution
x y y’
0 1 1
0.25 1.25 1.5
0.5 1.625 2.125
0.75 2.1563 2.9063
1 2.8828
7. For the initial condition y(0) = 3, using Euler’s method with a step
size h = 0.1 to estimate the value of y at x = 0.5 for y ′ − 2xy = 1.
solution
y ′ = 2xy + 1.
x f (x) f ′ (x)
0 3 1
0.1 3.1 1.62
0.2 3.262 2.3048
0.3 3.4925 3.0955
0.4 3.8020 4.0416
0.5 4.2062 5.2062
8. Find the first two approximations using Euler’s method for the differ-
dy
ential equation dx = 2y, y(1) = 2, starting at x = 1 with h = 0.1.
solution
x f (x) f ′ (x)
1 2 4
1.1 2.4 4.8
1.2 2.88
9. Suppose y changes with time t according to the equation y ′ = 1 + 2y
and y = 3 when t = 0.
(a) What is the rate of change of y when y = 0?
(b) Suppose when t = 0, y = 3. Use Euler’s method with step size
h = 0.5 to estimate y(1)
solution
dy
(a) Rate of change of y = dt
when y = 0 is y ′ = 1 + 2(0) = 1.
14
(b) Use Euler’s method with step size h = 0.5 to estimate y(1)
t f (t) f ′ (t)
0 3 7
0.5 6.5 14
1.0 13.5
15