Answer:
a.
With n = 25, ![\int_{0}^{1}e^{6 x}\ dx \approx 67.3930999748549](https://tex.z-dn.net/?f=%5Cint_%7B0%7D%5E%7B1%7De%5E%7B6%20x%7D%5C%20dx%20%5Capprox%2067.3930999748549)
With n = 50, ![\int_{0}^{1}e^{6 x}\ dx \approx 67.1519320308594](https://tex.z-dn.net/?f=%5Cint_%7B0%7D%5E%7B1%7De%5E%7B6%20x%7D%5C%20dx%20%5Capprox%2067.1519320308594)
b. ![\int_{0}^{1}e^{6 x}\ dx \approx 67.0715427161943](https://tex.z-dn.net/?f=%5Cint_%7B0%7D%5E%7B1%7De%5E%7B6%20x%7D%5C%20dx%20%5Capprox%2067.0715427161943)
c.
The absolute error in the trapezoid rule is 0.08047
The absolute error in the Simpson's rule is 0.00008
Step-by-step explanation:
a. To approximate the integral
using n = 25 with the trapezoid rule you must:
The trapezoidal rule states that
![\int_{a}^{b}f(x)dx\approx\frac{\Delta{x}}{2}\left(f(x_0)+2f(x_1)+2f(x_2)+...+2f(x_{n-1})+f(x_n)\right)](https://tex.z-dn.net/?f=%5Cint_%7Ba%7D%5E%7Bb%7Df%28x%29dx%5Capprox%5Cfrac%7B%5CDelta%7Bx%7D%7D%7B2%7D%5Cleft%28f%28x_0%29%2B2f%28x_1%29%2B2f%28x_2%29%2B...%2B2f%28x_%7Bn-1%7D%29%2Bf%28x_n%29%5Cright%29)
where ![\Delta{x}=\frac{b-a}{n}](https://tex.z-dn.net/?f=%5CDelta%7Bx%7D%3D%5Cfrac%7Bb-a%7D%7Bn%7D)
We have that a = 0, b = 1, n = 25.
Therefore,
![\Delta{x}=\frac{1-0}{25}=\frac{1}{25}](https://tex.z-dn.net/?f=%5CDelta%7Bx%7D%3D%5Cfrac%7B1-0%7D%7B25%7D%3D%5Cfrac%7B1%7D%7B25%7D)
We need to divide the interval [0,1] into n = 25 sub-intervals of length
, with the following endpoints:
![a=0, \frac{1}{25}, \frac{2}{25},...,\frac{23}{25}, \frac{24}{25}, 1=b](https://tex.z-dn.net/?f=a%3D0%2C%20%5Cfrac%7B1%7D%7B25%7D%2C%20%5Cfrac%7B2%7D%7B25%7D%2C...%2C%5Cfrac%7B23%7D%7B25%7D%2C%20%5Cfrac%7B24%7D%7B25%7D%2C%201%3Db)
Now, we just evaluate the function at these endpoints:
![f\left(x_{0}\right)=f(a)=f\left(0\right)=1=1](https://tex.z-dn.net/?f=f%5Cleft%28x_%7B0%7D%5Cright%29%3Df%28a%29%3Df%5Cleft%280%5Cright%29%3D1%3D1)
![2f\left(x_{1}\right)=2f\left(\frac{1}{25}\right)=2 e^{\frac{6}{25}}=2.54249830064281](https://tex.z-dn.net/?f=2f%5Cleft%28x_%7B1%7D%5Cright%29%3D2f%5Cleft%28%5Cfrac%7B1%7D%7B25%7D%5Cright%29%3D2%20e%5E%7B%5Cfrac%7B6%7D%7B25%7D%7D%3D2.54249830064281)
![2f\left(x_{2}\right)=2f\left(\frac{2}{25}\right)=2 e^{\frac{12}{25}}=3.23214880438579](https://tex.z-dn.net/?f=2f%5Cleft%28x_%7B2%7D%5Cright%29%3D2f%5Cleft%28%5Cfrac%7B2%7D%7B25%7D%5Cright%29%3D2%20e%5E%7B%5Cfrac%7B12%7D%7B25%7D%7D%3D3.23214880438579)
...
![2f\left(x_{24}\right)=2f\left(\frac{24}{25}\right)=2 e^{\frac{144}{25}}=634.696657835701](https://tex.z-dn.net/?f=2f%5Cleft%28x_%7B24%7D%5Cright%29%3D2f%5Cleft%28%5Cfrac%7B24%7D%7B25%7D%5Cright%29%3D2%20e%5E%7B%5Cfrac%7B144%7D%7B25%7D%7D%3D634.696657835701)
![f\left(x_{25}\right)=f(b)=f\left(1\right)=e^{6}=403.428793492735](https://tex.z-dn.net/?f=f%5Cleft%28x_%7B25%7D%5Cright%29%3Df%28b%29%3Df%5Cleft%281%5Cright%29%3De%5E%7B6%7D%3D403.428793492735)
Applying the trapezoid rule formula we get
![\int_{0}^{1}e^{6 x}\ dx \approx \frac{1}{50}(1+2.54249830064281+3.23214880438579+...+634.696657835701+403.428793492735)\approx 67.3930999748549](https://tex.z-dn.net/?f=%5Cint_%7B0%7D%5E%7B1%7De%5E%7B6%20x%7D%5C%20dx%20%5Capprox%20%5Cfrac%7B1%7D%7B50%7D%281%2B2.54249830064281%2B3.23214880438579%2B...%2B634.696657835701%2B403.428793492735%29%5Capprox%2067.3930999748549)
- To approximate the integral
using n = 50 with the trapezoid rule you must:
We have that a = 0, b = 1, n = 50.
Therefore,
![\Delta{x}=\frac{1-0}{50}=\frac{1}{50}](https://tex.z-dn.net/?f=%5CDelta%7Bx%7D%3D%5Cfrac%7B1-0%7D%7B50%7D%3D%5Cfrac%7B1%7D%7B50%7D)
We need to divide the interval [0,1] into n = 50 sub-intervals of length
, with the following endpoints:
![a=0, \frac{1}{50}, \frac{1}{25},...,\frac{24}{25}, \frac{49}{50}, 1=b](https://tex.z-dn.net/?f=a%3D0%2C%20%5Cfrac%7B1%7D%7B50%7D%2C%20%5Cfrac%7B1%7D%7B25%7D%2C...%2C%5Cfrac%7B24%7D%7B25%7D%2C%20%5Cfrac%7B49%7D%7B50%7D%2C%201%3Db)
Now, we just evaluate the function at these endpoints:
![f\left(x_{0}\right)=f(a)=f\left(0\right)=1=1](https://tex.z-dn.net/?f=f%5Cleft%28x_%7B0%7D%5Cright%29%3Df%28a%29%3Df%5Cleft%280%5Cright%29%3D1%3D1)
![2f\left(x_{1}\right)=2f\left(\frac{1}{50}\right)=2 e^{\frac{3}{25}}=2.25499370315875](https://tex.z-dn.net/?f=2f%5Cleft%28x_%7B1%7D%5Cright%29%3D2f%5Cleft%28%5Cfrac%7B1%7D%7B50%7D%5Cright%29%3D2%20e%5E%7B%5Cfrac%7B3%7D%7B25%7D%7D%3D2.25499370315875)
![2f\left(x_{2}\right)=2f\left(\frac{1}{25}\right)=2 e^{\frac{6}{25}}=2.54249830064281](https://tex.z-dn.net/?f=2f%5Cleft%28x_%7B2%7D%5Cright%29%3D2f%5Cleft%28%5Cfrac%7B1%7D%7B25%7D%5Cright%29%3D2%20e%5E%7B%5Cfrac%7B6%7D%7B25%7D%7D%3D2.54249830064281)
...
![2f\left(x_{49}\right)=2f\left(\frac{49}{50}\right)=2 e^{\frac{147}{25}}=715.618483417705](https://tex.z-dn.net/?f=2f%5Cleft%28x_%7B49%7D%5Cright%29%3D2f%5Cleft%28%5Cfrac%7B49%7D%7B50%7D%5Cright%29%3D2%20e%5E%7B%5Cfrac%7B147%7D%7B25%7D%7D%3D715.618483417705)
![f\left(x_{50}\right)=f(b)=f\left(1\right)=e^{6}=403.428793492735](https://tex.z-dn.net/?f=f%5Cleft%28x_%7B50%7D%5Cright%29%3Df%28b%29%3Df%5Cleft%281%5Cright%29%3De%5E%7B6%7D%3D403.428793492735)
Applying the trapezoid rule formula we get
![\int_{0}^{1}e^{6 x}\ dx \approx \frac{1}{100}(1+2.25499370315875+2.54249830064281+...+715.618483417705+403.428793492735) \approx 67.1519320308594](https://tex.z-dn.net/?f=%5Cint_%7B0%7D%5E%7B1%7De%5E%7B6%20x%7D%5C%20dx%20%5Capprox%20%5Cfrac%7B1%7D%7B100%7D%281%2B2.25499370315875%2B2.54249830064281%2B...%2B715.618483417705%2B403.428793492735%29%20%5Capprox%2067.1519320308594)
b. To approximate the integral
using 2n with the Simpson's rule you must:
The Simpson's rule states that
![\int_{a}^{b}f(x)dx\approx \\\frac{\Delta{x}}{3}\left(f(x_0)+4f(x_1)+2f(x_2)+4f(x_3)+2f(x_4)+...+2f(x_{n-2})+4f(x_{n-1})+f(x_n)\right)](https://tex.z-dn.net/?f=%5Cint_%7Ba%7D%5E%7Bb%7Df%28x%29dx%5Capprox%20%5C%5C%5Cfrac%7B%5CDelta%7Bx%7D%7D%7B3%7D%5Cleft%28f%28x_0%29%2B4f%28x_1%29%2B2f%28x_2%29%2B4f%28x_3%29%2B2f%28x_4%29%2B...%2B2f%28x_%7Bn-2%7D%29%2B4f%28x_%7Bn-1%7D%29%2Bf%28x_n%29%5Cright%29)
where ![\Delta{x}=\frac{b-a}{n}](https://tex.z-dn.net/?f=%5CDelta%7Bx%7D%3D%5Cfrac%7Bb-a%7D%7Bn%7D)
We have that a = 0, b = 1, n = 50
Therefore,
![\Delta{x}=\frac{1-0}{50}=\frac{1}{50}](https://tex.z-dn.net/?f=%5CDelta%7Bx%7D%3D%5Cfrac%7B1-0%7D%7B50%7D%3D%5Cfrac%7B1%7D%7B50%7D)
We need to divide the interval [0,1] into n = 50 sub-intervals of length
, with the following endpoints:
![a=0, \frac{1}{50}, \frac{1}{25},...,\frac{24}{25}, \frac{49}{50}, 1=b](https://tex.z-dn.net/?f=a%3D0%2C%20%5Cfrac%7B1%7D%7B50%7D%2C%20%5Cfrac%7B1%7D%7B25%7D%2C...%2C%5Cfrac%7B24%7D%7B25%7D%2C%20%5Cfrac%7B49%7D%7B50%7D%2C%201%3Db)
Now, we just evaluate the function at these endpoints:
![f\left(x_{0}\right)=f(a)=f\left(0\right)=1=1](https://tex.z-dn.net/?f=f%5Cleft%28x_%7B0%7D%5Cright%29%3Df%28a%29%3Df%5Cleft%280%5Cright%29%3D1%3D1)
![4f\left(x_{1}\right)=4f\left(\frac{1}{50}\right)=4 e^{\frac{3}{25}}=4.5099874063175](https://tex.z-dn.net/?f=4f%5Cleft%28x_%7B1%7D%5Cright%29%3D4f%5Cleft%28%5Cfrac%7B1%7D%7B50%7D%5Cright%29%3D4%20e%5E%7B%5Cfrac%7B3%7D%7B25%7D%7D%3D4.5099874063175)
![2f\left(x_{2}\right)=2f\left(\frac{1}{25}\right)=2 e^{\frac{6}{25}}=2.54249830064281](https://tex.z-dn.net/?f=2f%5Cleft%28x_%7B2%7D%5Cright%29%3D2f%5Cleft%28%5Cfrac%7B1%7D%7B25%7D%5Cright%29%3D2%20e%5E%7B%5Cfrac%7B6%7D%7B25%7D%7D%3D2.54249830064281)
...
![4f\left(x_{49}\right)=4f\left(\frac{49}{50}\right)=4 e^{\frac{147}{25}}=1431.23696683541](https://tex.z-dn.net/?f=4f%5Cleft%28x_%7B49%7D%5Cright%29%3D4f%5Cleft%28%5Cfrac%7B49%7D%7B50%7D%5Cright%29%3D4%20e%5E%7B%5Cfrac%7B147%7D%7B25%7D%7D%3D1431.23696683541)
![f\left(x_{50}\right)=f(b)=f\left(1\right)=e^{6}=403.428793492735](https://tex.z-dn.net/?f=f%5Cleft%28x_%7B50%7D%5Cright%29%3Df%28b%29%3Df%5Cleft%281%5Cright%29%3De%5E%7B6%7D%3D403.428793492735)
Applying the Simpson's rule formula we get
![\int_{0}^{1}e^{6 x}\ dx \approx \frac{1}{150}(1+4.5099874063175+2.54249830064281+...+1431.23696683541+403.428793492735) \approx 67.0715427161943](https://tex.z-dn.net/?f=%5Cint_%7B0%7D%5E%7B1%7De%5E%7B6%20x%7D%5C%20dx%20%5Capprox%20%5Cfrac%7B1%7D%7B150%7D%281%2B4.5099874063175%2B2.54249830064281%2B...%2B1431.23696683541%2B403.428793492735%29%20%5Capprox%2067.0715427161943)
c. If B is our estimate of some quantity having an actual value of A, then the absolute error is given by ![|A-B|](https://tex.z-dn.net/?f=%7CA-B%7C)
The absolute error in the trapezoid rule is
The calculated value is
and our estimate is 67.1519320308594
Thus, the absolute error is given by
![|67.0714655821225-67.1519320308594|=0.08047](https://tex.z-dn.net/?f=%7C67.0714655821225-67.1519320308594%7C%3D0.08047)
The absolute error in the Simpson's rule is
![|67.0714655821225-67.0715427161943|=0.00008](https://tex.z-dn.net/?f=%7C67.0714655821225-67.0715427161943%7C%3D0.00008)