Bisection method for the equation x3−2x−2 = 0 which has a single root(adsbygoogle = window.adsbygoogle || []).push({});

between x=−4 and x = 2.

here's the code I have

I know there's something wrong with my code. Can somebody help me please?Code (Text):

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

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Bisection method in fortran 90

Loading...

Similar Threads - Bisection method fortran | Date |
---|---|

What's wrong with my bisection method code? | Dec 10, 2017 |

C/++/# Simple bisection program - solved | Apr 12, 2017 |

Fortran bisection method | Apr 18, 2013 |

Bisection method by c | Feb 7, 2009 |

Bisection Method | Nov 8, 2008 |

**Physics Forums - The Fusion of Science and Community**