# Show that trapezoidal rule is exact for y(t)=t and y(t)=1?

1. Sep 7, 2009

### shehpar

Anybody can guide me about it. At least start me in right direction . thanks

2. Sep 7, 2009

### loveequation

Let the interval of integration be from t = a to t = b.

Next do an an exact integration. For example the linear function integrates to
$$\frac{1}{2} (b^2 - a^2)$$

Then apply the trapezoidal rule using one interval and see that it gives the same result. I won't do it for you except to recall that the trapezoidal rule is:
$$\frac{1}{2}(b - a)(y(a) + y(b))$$

Hope you get it.

3. Sep 7, 2009

### shehpar

Thanks for guiding me, I found the solution.

4. Sep 7, 2009

### LCKurtz

And you will probably need to do it with n intervals. So your subintervals will be length

$$\delta = \frac {(b-a)}{n}$$.

and your subdivision points will be

$$t_k = a + k\delta$$

for k from 0 to n. Now put these values in the formula

$$T_n = \frac \delta 2 (y_0 + 2y_1 + ... + 2y_{n-1} + y_n)$$

You will have to put in the y values using y = t (or y = 1 for the simpler problem). Then if you look carefully, you will see that you can factor and collect terms and add up an arithmetic series. Substitute in your value for delta and with any luck, you're done.