Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Trapezoidal rule
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Example== The following integral is given: <math display="block"> \int_{0.1}^{1.3}{5xe^{- 2x}{dx}} </math> {{ordered list| list-style-type = lower-alpha | Use the composite trapezoidal rule to estimate the value of this integral. Use three segments. | Find the true error <math display="inline"> E_{t} </math> for part (a). | Find the absolute relative true error <math display="inline"> \left| \varepsilon_{t} \right| </math> for part (a). }} '''Solution''' {{ordered list| list-style-type = lower-alpha | The solution using the composite trapezoidal rule with 3 segments is applied as follows. <math display="block"> \int_{a}^{b}{f(x){dx}} \approx \frac{b - a}{2n}\left\lbrack f(a) + 2\sum_{i = 1}^{n - 1}{f(a + {ih})} + f(b) \right\rbrack </math> <math display="block">\begin{align} n &= 3 \\ a &= 0.1 \\ b &= 1.3 \\ h &= \frac{b - a}{n} = \frac{1.3 - 0.1}{3} = 0.4 \end{align} </math> Using the composite trapezoidal rule formula <math display="block"> \begin{align} \int_a^b {f(x){dx}} \approx \frac{b - a}{2n} \left\lbrack f(a) + 2\left\{ \sum_{i = 1}^{n - 1}{f(a + {ih})} \right\} + f(b) \right\rbrack\;\;\;\;\;\;\;\;\;\;\;\; (3) \end{align} </math> <math display="block"> \begin{align} I &\approx \frac{1.3 - 0.1}{6}\left\lbrack f(0.1) + 2\sum_{i = 1}^{3 - 1}{f(0.1 + 0.4i)} + f(1.3) \right\rbrack\\ I &\approx \frac{1.3 - 0.1}{6}\left\lbrack f(0.1) + 2\sum_{i = 1}^{2}{f(0.1 + 0.4i)} + f(1.3) \right\rbrack\\ &= 0.2\lbrack f(0.1) + 2f(0.5) + 2f(0.9) + f(1.3)\rbrack\\ &= 0.2[5 \times 0.1 \times e^{- 2(0.1)}+2(5 \times 0.5 \times e^{- 2(0.5)})+2(5 \times 0.9 \times e^{- 2(0.9)}) + 5 \times 1.3 \times e^{- 2(1.3)}\rbrack\\ &= 0.84385 \end{align} </math> | The exact value of the above integral can be found by integration by parts and is <math display="block"> \int_{0.1}^{1.3} 5xe^{- 2x}{dx} = 0.89387 </math> So the true error is <math display="block"> \begin{align} E_{t} &= \text{True Value} - \text{Approximate Value}\\ &= 0.89387 - 0.84385\\ &= 0.05002 \end{align} </math> | The absolute relative true error is <math display="block"> \displaystyle \begin{align}\left| \varepsilon_{t} \right| &= \left| \frac{\text{True Error}}{\text{True Value}} \right| \times 100\%\\ &= \left| \frac{0.05002}{0.89387} \right| \times 100\%\\ &= 5.5959\% \end{align} </math> }}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)