Rose-Hulman Institute of Technology Department of Chemical Engineering CHE 110 - Introduction to Programming & Problem Solving Spring 2006 Workshop 1: Creating a Customized VBA Worksheet Function to Perform Numerical Integration Using the Trapezoidal Rule Background The trapezoidal rule for numerical integration discussed in Week 2 is summarized below. ()()foxn1i1iixii1ifxfxdxx2xxx,nnumber of discrete points−+=++≈ΔΔ=−=∑∫00.10.20.30.126.96.36.199.80.91xf(x)trapezoidal rulex0x1x2x3x4x5Objective Develop a customized VBA worksheet function named trapezoidthat will accept as input cell ranges containing an arbitrary number of discrete values for x and f(x). The function should return a single number representing , where the integration limits xfoxxx∫oand xfrepresent the corresponding range of x values.
This is the end of the preview.
access the rest of the document.