printf("Solution does't converge ,iterations not sufficient");
58
return;
59
}
60
61
Output
1
2
3
Enter initial guesses, number of iterations and maximum iterations error:
4
1 2 14 0.0001
5
Iteration number 1: x = 1.125000
6
Iteration number 2: x = 1.177982
7
Iteration number 3: x = 1.199415
8
Iteration number 4: x = 1.207914
9
Iteration number 5: x = 1.211257
10
Iteration number 6: x = 1.212568
11
Iteration number 7: x = 1.213082
12
Iteration number 8: x = 1.213282
13
Iteration number 9: x = 1.213361
14
Iteration number 10: x = 1.213392
15
Iteration number 11: x = 1.213404
16
Iteration number 12: x = 1.213409
17
Iteration number 13: x = 1.213410
18
19
After 14 iterations root = 1.213411"
20
21
Rate the Code
Reviews are published after a quick safety check (usually within 24 hours).
Reviews are public. Developers can see basic device specifications to respond. Learn more
How to run Regula-Falsi Method program in C-Language?
To run Regula-Falsi Method program in C-Language, follow the below mentioned steps:
Copy the Code: Press the copy button in the code block to copy the complete code.
Open Turbo C++ Version 4: Open the Turbo C++ (Version 4) software on your system.
Paste the code: Paste the copied code into Turbo C++’s editor.
Compile the Code: Compile the program by pressing the Alt+F9 keys. This shows you the errors and warnings, if any.
Run the code: Press the Ctrl+F9 keys to run the program if the program is successfully compiled.
Enter the Input: Provide the required inputs or your desired inputs, if applicable.
Receive the Result: Get the result of the program on the screen based on the provided inputs.
More About the Regula Falsi Method
Discovered by: Babylonian, Egyptian, and Chinese mathematicians,
Discovered Year: In the 13th Century.
Regula Falsi is a numerical method also known as the False Position method, which is used to find the root of non-linear equations like f(x)=0.
It should have an interval at the starting point, like f(a) x f(b) <0.
How does it work?
Regula Falsi method connects two points with a straight line (secant line) and detects the exact intersection point with the x-axis. And this intersection point could be considered a new root: c = (a · f (b) – b · f (a))/f(b)-f(a).
Why Regula Falsi?
Because Regula Falsi method accepts the exact function values to find out the root instead of blinding mid-point detection like bisection method.
Real-life applications:
Chemical & Process Engineering: To solve the non-linear thermodynamic equations and reaction rates.
Engineering & Design: To get the exact value of any structure or mechanism for the design parameters, as well as to find the generated convergence.
To get the soil settlement in big structures like a dam, bridges, or high-rise buildings
Limitations
One-sided convergence: The biggest problem of the Regula Falsi method is that if one-sided curve is larger, the method gets stuck at that side, and on the opposite side it works extremely slowly; as a result, it is very slow in that case.
Alternate Methods of Regula Falsi Methods
The modified regula falsi method solves this stuck issue by reducing the weight of the stagnant side.
The secant method solves this problem by removing the bracketing condition; as a result, it works faster.
License: This program's source code is open-sourced under the MIT License, while the rest of the program's text content and overall dhimanp platform and brand content remain proprietary under dhimanp.
Submit your modified code
Your submissions are published after a quick safety check (usually within 7 days).
Submissions are public. Developers can see basic device specifications to respond. Learn more
How to submit your modified code?
If you are a student, teacher, or anyone who wants to submit your code for credit, then follow the steps below to easily submit your code to the dhimanp platform.
Important Note:
Code will be accepted with zero errors.
All code should be text only (no file attachments allowed).
Make sure you have all the code in Notepad.
Code should include comments and proper formatting so that your code is easily understandable.
Below are the steps:
Add Program Purpose and Your Details: Open Notepad, add the purpose of the program on line 1, and add your full Name, school or college name, and city name on line 2 as comments. You may skip the school or college name if you don’t have one.
Add Your Code: Copy your code and paste it into Notepad on line 3.
Optional for More Files: If you have more than one file, then paste each file's code into Notepad one by one, with the file name too, from line 3.
Insert code into the Page Review Input box: Copy the Notepad text content and paste this content into the review input box below.
Submit: Enter your name in the input field (name is optional here) and click on the Submit button.
1
// Program: numerical analysis regula falsi method program
2
// Submitted by: Aarav Sharma, ABC Public School, Delhi
3
4
//file1.c
5
#include <stdio.h>
6
int main()
7
{
8
// Your code here
9
return 0;
10
}
How do we verify and give credit?
After receiving your submitted code, we will review it, verify it, and run your program.
If your program is 100% safe, secure, and unique, then we will add the code as a new Page with proper definitions and description details of this code.
We will add your full name, school or college name, and city as you provide.
This process may take up to 1 week.
Disclaimer
The information that you shared with us will be publicly visible, and everyone can see your information. And we (dhimanp) are not responsible if anyone misuses this information. We can remove any submitted code at any time for better transparency.
Privacy Policy
If you share your data with us by submitting your code for credit, then we may show your full name, school or college name, and city name on our website.
We are not using this data to track you and are not selling this data to anyone.
If you want to remove your name from our website, you can contact us, and we will remove your name from our website. In the removal process, full credit, including your full name, school or college, city, and code, will be removed from our website.