Functions
bisection.hpp File Reference

Solution of transcendental equations with a single variable using the bisection method. More...

#include "func_1_var.hpp"
Include dependency graph for bisection.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double find_upper_bracket (Func1Var const &f, double xl)
 Finds an upper limit to an equation. More...
 
double bisection (Func1Var const &f, double xl, double xr, double tol=1e-6)
 Solves a monotonous transcendental equation using the bisection method. More...
 

Detailed Description

Solution of transcendental equations with a single variable using the bisection method.

Author
Almog Yalinewich

Definition in file bisection.hpp.

Function Documentation

◆ bisection()

double bisection ( Func1Var const &  f,
double  xl,
double  xr,
double  tol = 1e-6 
)

Solves a monotonous transcendental equation using the bisection method.

Parameters
fOne dimensional function
xlLeft bound
xrRight bound
tolTolerance
Returns
The solution

Definition at line 34 of file bisection.cpp.

Here is the call graph for this function:

◆ find_upper_bracket()

double find_upper_bracket ( Func1Var const &  f,
double  xl 
)

Finds an upper limit to an equation.

Doubles the value until the equation changes sign

Parameters
fOne dimensional function
xlLower limit
Returns
The upper limit

Definition at line 13 of file bisection.cpp.

Here is the call graph for this function: