Mathematical Programming
Homework 1
Bisection Program
Procedure
Modify an existing program (or write a new program) to apply the bisection algorithm to the equation:
x
3
+ 4x
2
- 10 = 0
Choice of programming language is yours.
Organize the program as:
Input
Prompt the user for:
The two initial X values
The acceptable tolerance
The maximum number of iterations
Processing:
Apply the bisection algorithm.
Output:
Report to the user
Success or failure
The number of steps used
The final X value
The final Y value
Use the program to find a root of the equation.
Use a calculator to verify the root.
Submit the source code and an executable file as discussed in class.
Reference Links
C Now
Bisection Algorithm in C
C++ Now
Bisection Algorithm in C++
FORTRAN Now
Bisection Algorithm in FORTRAN
Java Now
Bisection Algorithm in Java