Question: a) Develop a VB/VBA function for performing numerical integration using Simpsons rule by completing the code below. You may assume that the code has access

 a) Develop a VB/VBA function for performing numerical integration using Simpsons

a) Develop a VB/VBA function for performing numerical integration using Simpsons rule by completing the code below. You may assume that the code has access to a function g( ByVal x as double) as double which computes values of the mathematical function which is to be integrated. Function Simpsons (ByVal a As Double, ByVal b As Double, ByVal n As Integer) As Double INPUT ARGUMENTS -Lower integration limit b Upper integration limit -Number of panels COMPLETE THIS SECTION OF CODE End Function Page 1 of5 CIVL2050 Engineering Computations and Probability WT 2018 b) Use the function Simpsons ) to approximate the following integral using 6 and 12 panels -4cos() c) Use the Romberg method to estimate the error in your results from (b) and compute a more accurate approximation for the integral

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!