Write a generic VBA Sub procedure to compute the value of th
Write a generic VBA Sub procedure to compute the value of the following Integral (I) using the Trapezoidal Rule.
dacSolution
// Trapazoidal rule calculates area under the curve
// n is number of interval
Function Integration(a As Integer, b as Integer, n As Integer) As Double
Dim sum as Double
sum = (F(a) + F(b))/2
For i = 1 To n - 1
sum = sum + F(a + ((b-a)/n)*i)
Next i
Integration = sum * (b-a)/n
End Function
