simpson:
A function that calculates the area under a curve based on the Simposon algorithm
Description
A function that calculates the approximate value of the definite integral of a continuous function. In other words, it can help plot the area under the curve of the plotted
function between two limits.
Usage
simpson(x, y)
Arguments
x
A vector of the values at which the function is to be plotted.
y
A vector with the values of the function at the corresponding x-values.
Value
A single numerical value of the approximate area under the curve generated with the x and y values.