A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://TheAlgorithms.github.io/C-Plus-Plus/dd/d29/false__position_8cpp.html below:

TheAlgorithms/C++: numerical_methods/false_position.cpp File Reference

Solve the equation \(f(x)=0\) using false position method, also known as the Secant method.

First, multiple intervals are selected with the interval gap provided. Separate recursive function called for every root. Roots are printed Separatelt.

For an interval [a,b] \(a\) and \(b\) such that \(f(a)<0\) and \(f(b)>0\), then the \((i+1)^\text{th}\) approximation is given by:

\[x_{i+1} = \frac{a_i\cdot f(b_i) - b_i\cdot f(a_i)}{f(b_i) - f(a_i)} \]

For the next iteration, the interval is selected as: \([a,x]\) if \(x>0\) or \([x,b]\) if \(x<0\). The Process is continued till a close enough approximation is achieved.

See also
newton_raphson_method.cpp, bisection_method.cpp

Definition in file false_position.cpp.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4