- Trending Categories
- Selected Reading
Secant method is also used to solve non-linear equations. This method is similar to the Newton-Raphson method, but here we do not need to find the differentiation of the function f(x). Only using f(x), we can find f’(x) numerically by using Newton’s Divide difference formula. From the Newton-Raphson formula,
we know that,
Now, using divide difference formula, we get,
The secant method is also a root-finding method which is very much similar to the regula falsi method but the only difference is the condition that is the value at the initial point of the function and the final point of the function has the opposite signs. It uses the succession of roots. C Program Output: Secant Method. Enter first guess: 0 Enter second guess: 1 Enter tolerable error: 0.000001 Enter maximum iteration: 10. Secant Method. Iteration-1: x2 = -5.000000 and f (x2) = -120.000000 Iteration-2: x2 = 1.315789 and f (x2) = -5.353550 Iteration-3: x2 = 1.610713 and f (x2) = -4.042600 Iteration-4: x2 = 2.520173 and f (x2) = 5.965955 Iteration-5: x2 = 1.978057 and f (x2) = -1.216554 Iteration-6: x2 = 2.069879 and f (x2) = -0.271572 Iteration-7. Sample Output: Enter the value of. C Program for Birge-Vieta Method; C Program for. The equation used in the following secant method c programs are as follows. Step 5: Exit Convergence criteria for Secant Method. Fixing apriori the total number of iterations (limit). Testing the condition (x i+1−x i), is less than some tolerance limit.
By replacing the f’(x) of Newton-Raphson formula by the new f’(x), we can find the secant formula to solve non-linear equations.
Note: For this method, we need any two initial guess to start finding the root of non-linear equations.
Input and Output
Algorithm
Input: Two initial guess for root.
Output: The approximate root of a non-linear equation f(x).
Example
C Program For Secant Method With Output
Output
C Program For Secant Method With Output Function
- Related Questions & Answers