find the positive value of cosx=xe^x using bisection method
Answers
Answer:
f(x)=cosx-x.e^x
f(π/4)=cos(π/4)-(π/4).e^(π/4)
f(π/4)=1.7225
f(π/2)=cos(π/2)-(π/2).e^(π/2)
f(π/2)=0-(π/2).e^(π/2)=7.854
f(π/3)=cos(π/3)-(π/3)*e^(π/3)
f(π/3)=(1/2)-(π/3)e^(π/3)
f(π/3)=-2.484
So the root lies in the interval (π/4,π/3)=(a,b)
As f(π/4) is very near to zero
b'=[(π/3)+(π/4)]/2
b'=7π/24
So new interval is x belongs to (π/4,7π/24)
f(7π/24)=cos(7π/24)-(7π/24)*e^(7π/24)
f(7π/24)=-1.68199
The root lies in the interval x''=[(π/4)+(7π/24)]/2
x''=13π/48
So roots lies in (π/4,13π/48)
f(13π/48)=-1.9371
so new interval is (π/4,
x'''=[(π/4)+(13π/48)]/2
x'''=25π/96
f(25π/96)=-2.83525
x'''"=[(π/4)+(25π/96)]/2
x'''''=(39π)/(192)
So x is in (π/4, 39π/192)
f(39π/192)=cos(39π/192)-(39π/192)*e^(39π/192)
f(39π/192)=-0.787
so x'”'”=((π/4)+(39π/192))/2
x''''''=87π/384
f(87π/384)=-1.3638
On following the iteration the solution is nearly
x=87π/384