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 email@example.com. 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
- Number of ways to reach (X, Y) in a matrix starting from the origin
- Find if a crest is present in the index range [L, R] of the given array
- Find the last two missing digits of the given phone number
- Multiply Large Numbers using Grid Method
- Maximum frequency of a remainder modulo 2i
Improved By : nitin mittal