What we are solvingf(x) = xeˣ + 5x − 10
Find f(1) and f(2), show a root lies between 1 and 2, then apply linear interpolation twice
Chapter: Numerical methods
Topic: location of roots, linear interpolation
Concept and formulasIf f is continuous and f(a), f(b) have opposite signs, f(x) = 0 has a root between a and b
Linear interpolation replaces the curve between the two points by a straight line
x1=a+f(b)−f(a)(0−f(a))(b−a)=a−f(b)−f(a)f(a)(b−a)Then the new interval is the half that still has a sign change
(a) (4 marks)f(1)=1⋅e1+5−10=2.7183−5=−2.2817f(2)=2e2+10−10=2e2=14.7781f(1) is negative and f(2) is positive, and f is continuous
So the graph crosses the x-axis between x = 1 and x = 2: f(x) = 0 has a root there
(b) (8 marks)First interpolation between (1, −2.2817) and (2, 14.7781)
x1=1+14.7781+2.28172.2817×(2−1)=1+17.05982.2817x1=1.1337f(1.1337)=1.1337e1.1337+5(1.1337)−10=−0.8084f(1.1337) is negative, so the root lies between 1.1337 and 2
Second interpolation between (1.1337, −0.8084) and (2, 14.7781)
x2=1.1337+14.7781+0.80840.8084×(2−1.1337)=1.1337+15.58650.7003x2=1.1337+0.0449=1.1787x≈1.179Answer: (a) f(1) = −2.2817, f(2) = 14.7781; sign change ⇒ root in (1, 2) (b) x ≈ 1.179
Tip: After each step test the sign of f at the new value to choose the next interval