A little context. A clearer answer.
When this calculator is useful
Enter a function and a bracket to see how bisection narrows a sign change. The parser accepts a limited mathematical grammar and checks expression-domain bounds across the full interval before iteration. For a related calculation, try Quadratic equation calculator.
What to enter
| Input | What it means | Example value |
|---|---|---|
| Function f(x) | Examples: cos(x)-x; x^3-2*x-5; log(x)-1. No implicit multiplication or executable code. | cos(x)-x |
| Left endpoint a | Left endpoint a | 0 |
| Right endpoint b | Right endpoint b | 1 |
| Absolute x tolerance | Absolute x tolerance, 1e−12 to 0.01; a small machine-precision term is also included. | 0.00000001 |
| Relative residual tolerance | Residual tolerance relative to the larger absolute endpoint value. Convergence requires the x test and this residual test, unless a numerical zero is reached. | 0.00000001 |
| Iteration limit | Maximum 200 bisection iterations. Reaching this limit is shown explicitly. | 100 |
How the calculation works
- Write f(x) with explicit multiplication, supported functions and integer literal powers.
- Choose a < b within the function’s domain and set x tolerance, relative residual tolerance and iteration limit.
- Read the stopping status and residual; expand the history to inspect the brackets. A failed bracket is not proof that no root exists.
m = a + (b−a)/2; keep the half whose endpoints have opposite signsA worked example
cos(x) − x on [0,1] converges to approximately 0.7390851332. For x² − 1 on [−2,0], bisection finds −1.
Example you can load
What to enterThis is a fixed example; changing the form above does not change these numbers.
Assumptions & limits
No guarantee of all roots. Even-multiplicity roots may lack a sign change. Conservative domain checks can reject valid expressions with dependent subexpressions; narrow the interval. Calculations use floating-point arithmetic, not a symbolic proof. For numerical precision, trigonometric arguments are limited to an absolute value of 1,000,000 radians.
Frequently asked questions
Which syntax is accepted?
Use x, pi, e, decimal numbers, + − * /, parentheses, sin, cos, tan, exp, log, sqrt and abs. Powers must be integer literals from −20 to 20. Trigonometric arguments are radians; log is natural logarithm.
Why is 1/x on [−1,1] rejected?
Its denominator crosses zero, so the sign change does not bracket a continuous zero. Tangent poles and invalid logarithm or square-root domains are also rejected.
What if both endpoint signs are the same?
The method reports no sign-changing bracket. An even-multiplicity root, several roots or closely spaced roots can still lie inside. Choose a smaller suitable interval.