- #1

- 128

- 0

between x=−4 and x = 2.

here's the code I have

Code:

```
program bisection2
implicit none
real :: fxa, xnew, xu, xl, fxb, fnew
xu=4
xl=2
1 xnew=(xu+xl)/2
fxa=(xnew**3-(2*xnew)-2)
fxb=(xl**3-(2*xl)-2)
fnew=fxa*fxb
if fxnew<0 then
xl=xl
xnew=xu
go to 1
if fxnew>0 then
xnew=xl
xu=xu
go to 1
print *, "fx(a) = ", fxa
print *, "fx(b) = ", fxb
end program bisection2
```

Here are the Bisection Method formulas

xm = (xl+xu)/2