Simson's Rule but Intervals Aren't the Same

419 Views Asked by At

I'm currently working on some homework, and ran into a question that has stumped me. We're working on Simpson's rule, which is easy enough, but then I got to a problem where the intervals aren't the same.

\begin{array}{|c|c|c|c|} \hline Time(seconds)& 1.2& 1.7& 2.3& 3.0& 3.9& 4.8& 5.9& 7.1& 8.5\\ \hline Velocity(mph)& 30& 40& 50& 60& 70& 80& 90& 100& 110\\ \hline \end{array}

It also gives me the information $60mph = 88 ft/sec$

I'm supposed to be using Simpson's rule to estimate the distance traveled by the car from time $t = 1.2 seconds$ and $t = 8.5 seconds$, but the time intervals aren't the same. What do I need to do to solve this?

1

There are 1 best solutions below

2
On BEST ANSWER

Use integration by parts

$$s=\int_{t_1}^{t_2}vdt=\!\!\!\!\!\left.\phantom{\frac{1}{2}}vt\,\right|_{t_1}^{t_2}-\int_{v_1}^{v_2}tdv.$$

Since your $v$ is equally spaced, you can do Simpson's integral. Simpson's rule is more accurate for equally spaced intervals because the third-order Taylor term is canceled as "free lunch".

Or one can use the formula

$$\int_a^bf(t)dg(t)\approx\begin{bmatrix}f(a),\;f(\frac{a+b}{2}),\;f(b)\end{bmatrix}\left(\begin{array}{rrr} \displaystyle-\frac{1}{2} & \displaystyle\frac{2}{3} & \displaystyle-\frac{1}{6}\\\displaystyle-\frac{2}{3} & 0\, & \displaystyle\frac{2}{3}\\ \displaystyle\frac{1}{6} & \displaystyle-\frac{2}{3} & \displaystyle\frac{1}{2} \end{array}\right)\begin{bmatrix}g(a)\\g(\frac{a+b}{2})\\g(b)\end{bmatrix}.$$

This formula is invariant under integration by parts, i.e., the right-hand side exactly reproduces

$$\int_a^b f(t)dg(t)+\int_a^b g(t)df(t)=f(b)g(b)-f(a)g(a),$$

and reduces to Simpson's rule if $\,g(t)=t\,$ is a linear function. I derived this myself but would appreciate anyone who can find me a reference.