Let g(x)=ex+sinx.
(a) Find the solution of g(x)=0 between x=−1 and x=0 using the bisection method, with error ≤0.1.
(b) Find the solution with a first-degree polynomial approximation.
(c) Find the solution with a second-degree polynomial approximation.
Solution
(a) Bisection. Check the sign change:
g(−1)=e−1+sin(−1)=0.368−0.841=−0.473<0, g(0)=1+0=1>0. Root in [−1,0].
g(−0.5)=0.607−0.479=+0.127>0⇒ root in [−1,−0.5].
g(−0.75)=0.472−0.682=−0.210<0⇒ root in [−0.75,−0.5].
g(−0.625)=0.535−0.585=−0.050<0⇒ root in [−0.625,−0.5].
g(−0.5625)=0.570−0.533=+0.037>0⇒ root in [−0.625,−0.5625], width 0.0625<0.1.
So x0≈−0.59.
(b) First-degree approximation (Taylor at 0).g(0)=1, g′(x)=ex+cosx⇒g′(0)=2. Line: 1+2x=0⇒x1=−21=−0.5.
(c) Second-degree approximation.g′′(x)=ex−sinx⇒g′′(0)=1. Polynomial: 1+2x+2x2=0⇒x2+4x+2=0x=2−4+16−8=−2+2≈−0.586.
The quadratic value matches the bisection root well.
x0≈−0.586,x1=−0.5,x2=−2+2≈−0.586