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.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- 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
- Finding Integreand using Weedle's Rule
- Program for finding the Integral of a given function using Boole's Rule
- Count of integral coordinates that lies inside a Square
- Find integral points with minimum distance from given set of integers using BFS
- Probability that an arbitrary positive divisor of 10^X is an integral multiple of 10^Y
- Find initial integral solution of Linear Diophantine equation if finite solution exists
- Find the integral roots of a given Cubic equation
Improved By : nitin mittal