The table below gives data points for the continuous function y = f(x) Approximate the area under the curve y = f(x) on the interval [0, 2] using trapezoids and 10 equal subdivisions. You get area =
@mathmale ?
Suppose you have the following set of points on \(\color{#000000}{ \displaystyle y=f(x) }\), \(\color{#000000}{ \small \displaystyle \left\{ (x_0,y_0)~,~(x_1,y_1)~,~(x_2,y_2)~,~(x_3,y_3)~~\dots~~(x_n,y_n)\right\} }\) Then your trapezoids are in a form: \(\color{#000000}{ \small \displaystyle {\rm A}_{\rm trap}={\rm L}\times \frac{{\rm h}_1+{\rm h}_2}{2} ~\Longrightarrow ~\left((x_i-x_{i-1})\times \frac{y_{i-1}+y_i}{2}\right) }\) If all x-coordinates are evenly spaced, with the same change in x between any two points, (will traditionally call that space \(\Delta x\), and in your case 0.2) then, your i'th trapezoid is simply, \(\color{#000000}{ \small \displaystyle {\rm T}_{ i}=\left[ \frac{\Delta x(y_{i-1}+y_i)}{2}\right] }\) Therefore, the sum of all trapezoids, (or the approximated area under the curve \(\color{#000000}{ \displaystyle y=f(x) }\)) is as follows: \(\color{#000000}{ \small \displaystyle A={\rm T}_{ 1}+{\rm T}_{ 2}+{\rm T}_{ 3}+\dots + {\rm T}_{ n} }\) \(\color{#000000}{ \small \displaystyle A=\left[ \frac{\Delta x}{2}(y_{0}+y_1)\right]+\left[ \frac{\Delta x}{2}(y_{1}+y_2)\right]+\left[ \frac{\Delta x}{2}(y_{2}+y_3)\right]+\dots+\left[ \frac{\Delta x}{2}(y_{n-1}+y_n)\right] }\) \(\color{#000000}{ \small \displaystyle A=\frac{\Delta x}{2}\left[ y_{0}+y_1+y_{1}+y_2+y_{2}+y_3+y_{3}~\dots ~+y_{n-1}+y_{n-1}+y_{n}\right] }\) So, for evenly spaces x-coordinates, the following formula is derived. \(\color{#0000ff}{ \small \displaystyle A=\frac{\Delta x}{2}\left[ y_{0}+2y_{1}+2y_{2}+2y_{3}~\dots ~2y_{n-1}+y_{n}\right] }\) Which could alternatively be written as: \(\color{#0000ff}{ \small \displaystyle A=\frac{\Delta x}{2}(y_{0}+y_{n})+\Delta x\left( y_{1}+y_{2}+y_{3}~\dots ~y_{n-1}\right) }\)
Join our real-time social learning platform and learn together with your friends!