Question: 1. [10 points] The simplest scheme for integrating a one-dimensional function is the trapezoid rule. As you will recall, a one-dimensional integral is just
1. [10 points] The simplest scheme for integrating a one-dimensional function is the "trapezoid rule". As you will recall, a one-dimensional integral is just the area under a curve. To estimate the value of a definite integral, we thus estimate the area under the curve. Given a function a(t), the trapezoid rule (i) selects a step dt in the variable t, (ii) computes a(t) at integer multiples of dt (a(0), a(dt), a(2*dt), ....), (iii) computes the area in between each pair of time intervals as (a(i*dt)+a((i-1)*dt)/2, and (iv) sums up the areas over the domain of integration (say t=0 to t= N*dt). The accuracy of this scheme depends on the magnitude of dt - small is better but also more-costly computationally (more intervals over the domain of integration). Here, we will execute the trapezoidal rule for a simple function and analyze the accuracy (error) relative to the exact solution. The function to integrate is a(t) = a*sin(t) 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
