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.
- Number of integral solutions of the equation x1 + x2 +.... + xN = k
- Number of non-negative integral solutions of a + b + c = n
- Number of integral solutions for equation x = b*(sumofdigits(x)^a)+c
- Count Integral points inside a Triangle
- Number of non-negative integral solutions of sum equation
- Program for Simpson's 1/3 Rule
- Program to implement Simpson's 3/8 rule
- System of Linear Equations in three variables using Cramer's Rule
- Number of Integral Points between Two Points
- Check if the sum of digits of number is divisible by all of its digits
- Program for Mobius Function | Set 2
- Make the list non-decreasing by changing only one digit of the elements
- Maximum items that can be bought with the given type of coins
- Count occurrences of a prime number in the prime factorization of every element from the given range
Improved By : nitin mittal