Mada za sehemu hiiNumerical MethodMada 4
- Errors
- Roots By Iterative Methods
- Numerical Integration
- Simpson's Rule
Numerical integration approximates the numerical value of a definite integral. This is necessary when an integral cannot be evaluated analytically or when the analytical solution is too complex. The trapezoidal and Simpson's rules are common methods for this.
The trapezoidal rule approximates the area under a curve by dividing it into trapezoids.
Divide the region under from to into strips of equal width :
Area of each trapezium:
Trapezium 1:
Trapezium 2:
...
Trapezium n:
The total area under the curve is approximately the sum of the trapezium areas:
Simplifying:
Or:
Or:
Note:
Use the trapezoidal rule with five strips to evaluate , correct to four decimal places.
Solution:
, , ,
Table of values:
| n | x | y = f(x) |
|---|---|---|
| 0 | 0 | 1 |
| 1 | 0.2 | 1.5187 |
| 2 | 0.4 | 1.9051 |
| 3 | 0.6 | 2.1161 |
| 4 | 0.8 | 2.1064 |
| 5 | 1 | 2.3679 |
Estimate the value of using the trapezoidal rule with six ordinates (5 strips).
Solution:
, , ,
| n | x | f(x) |
|---|---|---|
| 0 | 1 | 1 |
| 1 | 1.2 | 0.8333 |
| 2 | 1.4 | 0.7143 |
| 3 | 1.6 | 0.6250 |
| 4 | 1.8 | 0.5556 |
| 5 | 2 | 0.5 |
Approximate the value of with subintervals using the trapezoidal rule.
Solution:
Given , then . Note: the original text had a typo in the function under the cosine. It should be not if we are to get the values presented in the table. If it is indeed supposed to be then the y values in the table will be different.
Using the trapezoidal rule:
Here, , , , so .
Table of values (assuming ):
| n | (for n=1 to 9) | ||
|---|---|---|---|
| 0 | 0 | 2 | |
| 1 | 0.1 | 1.173 | 2.346 |
| 2 | 0.2 | 1.691 | 3.382 |
| 3 | 0.3 | 1.955 | 3.910 |
| 4 | 0.4 | 1.995 | 3.990 |
| 5 | 0.5 | 1.802 | 3.604 |
| 6 | 0.6 | 1.401 | 2.802 |
| 7 | 0.7 | 0.838 | 1.676 |
| 8 | 0.8 | 0.165 | 0.330 |
| 9 | 0.9 | -0.536 | -1.072 |
| 10 | 1 | -0.190 | |
| Sum of and | 1.81 | ||
| Sum of to | 20.978 |
If however the function is or
| n | (for n=1 to 9) | ||
|---|---|---|---|
| 0 | 0 | 2 | |
| 1 | 0.1 | 1.995 | 3.99 |
| 2 | 0.2 | 1.98 | 3.96 |
| 3 | 0.3 | 1.955 | 3.91 |
| 4 | 0.4 | 1.92 | 3.84 |
| 5 | 0.5 | 1.875 | 3.75 |
| 6 | 0.6 | 1.82 | 3.64 |
| 7 | 0.7 | 1.755 | 3.51 |
| 8 | 0.8 | 1.68 | 3.36 |
| 9 | 0.9 | 1.595 | 3.19 |
| 10 | 1 | 1.5 | |
| Sum of and | 3.5 | ||
| Sum of to | 33.15 |
Mwalimu
Unasoma somo hili? Niulize nikuelezee chochote kilichomo.
Ingia ili kumuuliza Mwalimu wa AI wa Sonza kuhusu mada hii.
Ingia ili kuuliza