1. Find Solution of an equation 1/x using Trapezoidal rule
x1 = 1 and x2 = 2
Step value (h) = 0.25
Solution:
Equation is `f(x) = 1/x`.
The value of table for `x` and `y`
x | 1 | 1.25 | 1.5 | 1.75 | 2 |
---|
y | 1 | 0.8 | 0.6667 | 0.5714 | 0.5 |
---|
Using Trapezoidal Rule
`int y dx = h/2 [y_0+y_4 + 2(y_1 + y_2 + y_3)]`
`int y dx = 0.25/2 [1 + 0.5 + 2xx(0.8 + 0.6667 + 0.5714)]`
`int y dx = 0.25/2 [1 + 0.5 + 2xx(2.0381)]`
`int y dx = 0.697`
Solution by Trapezoidal Rule is `0.697`
2. Find Solution of an equation 2x^3-4x+1 using Trapezoidal rule
x1 = 2 and x2 = 4
Step value (h) = 0.5
Solution:
Equation is `f(x) = 2x^3-4x+1`.
The value of table for `x` and `y`
x | 2 | 2.5 | 3 | 3.5 | 4 |
---|
y | 9 | 22.25 | 43 | 72.75 | 113 |
---|
Using Trapezoidal Rule
`int y dx = h/2 [y_0+y_4 + 2(y_1 + y_2 + y_3)]`
`int y dx = 0.5/2 [9 + 113 + 2xx(22.25 + 43 + 72.75)]`
`int y dx = 0.5/2 [9 + 113 + 2xx(138)]`
`int y dx = 99.5`
Solution by Trapezoidal Rule is `99.5`
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then