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
- Find an array of size N having exactly K subarrays with sum S
- Find minimum value of y for the given x values in Q queries from all the given set of lines
- Find Kth number from sorted array formed by multiplying any two numbers in the array
- Minimum number of cuts required to pay salary from N length Gold Bar
- Sum of Maximum and Minimum prime factor of every number in the Array
Improved By : nitin mittal