Numerical Integration by Weddle's Rule: Page No ...
Numerical Integration by Weddle's Rule: Page No ...
Numerical Integration by Weddle's Rule: Page No ...
Numerical Integration by
Weddle’s Rule
Write a C-Program to compute the value of the following integral correct to 8 decimal places
by Weddle’s rule using 19 ordinates:
where 2.1
Since xi’s are equally spaced , so for integrating the given function we use COMPOSITE
WEDDLE’S RULE, as it is,
𝑏
3ℎ
𝑓 𝑥 𝑑𝑥 = [ 𝑦 + 𝑦𝑛 + 5(𝑦1 + 𝑦5 + 𝑦7 + ⋯ + 𝑦𝑛−1 ) + 𝑦2 + 𝑦4 + ⋯ + 𝑦𝑛−2
𝑎 10 0
+ 6 𝑦3 + 𝑦9 + 𝑦15 + ⋯ + 𝑦𝑛−3 + 2(𝑦6 + 𝑦12 + 𝑦18 + ⋯ + 𝑦𝑛−6 )]
Where
n ≥ 12
𝑏−𝑎
h=
𝑛
𝑦𝑟 = 𝑓 𝑥𝑟
𝑥𝑟 = 𝑥0 + 𝑟ℎ ; 𝑟 = 0,1, … , 𝑛.
𝑥0 = 𝑎 , 𝑥𝑛 = 𝑏.
OUTPUT :