Given a function and two integers a and b. The task is to find the integrand of the given function from lower limit(a) to upper limit(b) using Weedle’s Rule.
The given function is:
Input: a = 0, b = 6
Input: a = 10, b = 13
Output: f(x) = 0.022897
The integration of any function using Weedle’s Formula is given by:
and i = [0, 6]
Below are the steps:
- Find the value of h from the above formula i.e., h = .
- Find the value from to and calculate the value from to
- Substitute the above values in the Weedle’s Formula to find the integral value.
Below is the implementation of the above approach:
f(x) = 1.373448
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.
- Finding all subsets of a given set in Java
- Stein's Algorithm for finding GCD
- Finding number of digits in n'th Fibonacci number
- Finding sum of digits of a number until sum becomes single digit
- Trapezoidal Rule for Approximate Value of Definite Integral
- Finding LCM of more than two (or array) numbers without using GCD
- Finding 'k' such that its modulus with each array element is same
- Finding n-th number made of prime digits (2, 3, 5 and 7) only
- Finding power of prime number p in n!
- Finding number of days between two dates using StringStream
- Finding the best fit rectangle that covers a given point
- Program for Simpson's 1/3 Rule
- Program to implement Simpson's 3/8 rule
- Tomohiko Sakamoto's Algorithm- Finding the day of the week
- Finding nth term of any Polynomial Sequence
- Finding the vertex, focus and directrix of a parabola
- Finding a Non Transitive Coprime Triplet in a Range
- Finding n-th term of series 3, 13, 42, 108, 235…
- Finding Quadrant of a Coordinate with respect to a Circle
- System of Linear Equations in three variables using Cramer's Rule