In the field of numerical analysis, Trapezoidal rule is used to find the approximation of a definite integral. The basic idea in Trapezoidal rule is to assume the region under the graph of the given function to be a trapezoid and calculate its area.
It follows that:
Grid spacing or segment size h = (b-a) / n.
Therefore, approximate value of the integral can be given by:
Value of integral is 0.7842
This article is contributed by Harsh Agarwal. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Count Integral points inside a Triangle
- Number of Integral Points between Two Points
- Number of non-negative integral solutions of a + b + c = n
- Number of integral solutions of the equation x1 + x2 +.... + xN = k
- Program for Simpson's 1/3 Rule
- Number of non-negative integral solutions of sum equation
- Program to implement Simpson's 3/8 rule
- System of Linear Equations in three variables using Cramer's Rule
- Number of integral solutions for equation x = b*(sumofdigits(x)^a)+c
- Bitonic point in the given linked list
- Find XOR of numbers from the range [L, R]
- Check whether it is possible to convert A into B
- Find the minimum number of elements that should be removed to make an array good
- Number of elements from the array which are reachable after performing given operations on D
Improved By : nitin mittal