0% found this document useful (0 votes)
33 views2 pages

Final 8 X 2

The document discusses the Gauss elimination and Gauss–Jordan elimination methods for solving systems of equations. It provides specific examples of systems of equations and their solutions using these methods, along with finite difference formulas for calculating derivatives. Additionally, it includes details on truncation errors and the application of Taylor series in the context of numerical methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

Final 8 X 2

The document discusses the Gauss elimination and Gauss–Jordan elimination methods for solving systems of equations. It provides specific examples of systems of equations and their solutions using these methods, along with finite difference formulas for calculating derivatives. Additionally, it includes details on truncation errors and the application of Taylor series in the context of numerical methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Problem 4.4: Gauss Elimination Method Problem 4.9: Gauss–Jordan Elimination Method 1 0 0.8 −1.1 5 ← −(0.8)[0 0 1 1.75 −2.

em 4.9: Gauss–Jordan Elimination Method 1 0 0.8 −1.1 5 ← −(0.8)[0 0 1 1.75 −2.5] 8.1.2 Two-point backward difference formula for first derivative
0 1 −0.4 1.8 −1 ← −(−0.4)[0 0 1 1.75 −2.5]
Solve the following system of equations using the Gauss elimination method. Solve the following system of equations using the Gauss–Jordan elimination ൦ ൪ = f ᇱᇱ (x ୧ ) ଶ f ᇱᇱᇱ (x୧ ) ଷ f (ସ) (x ୧ ) ସ
0 0 1 1.75 −2.5 ← f(x୧ିଵ ) = f(x୧ ) − f ᇱ (x୧ )h + h − h + h +⋯
method. 2! 3! 4!
Given system of equations: 0 0 8.2 −10.4 29 ← −(8.2)[0 0 1 1.75 −2.5]
f ᇱᇱ (ξ) ଶ
2x₁ + x₂ − x₃ + 2x₄ = 0 Given system of equations: 1 0 0 −2.5 7 f(x୧ିଵ ) = f(x୧ ) − f ᇱ (x୧ )h + h
x₁ − 2x₂ + x₃ − 4x₄ = 3 4x₁ + 3x₂ + 2x₃ + x₄ = 17 0 1 0 2.5 −2 2!
൦ ൪ f(x୧ ) − f(x୧ିଵ ) f ᇱᇱ (ξ)
3x₁ − x₂ − 2x₃ − x₄ = −3 2x₁ − x₂ + 2x₃ − 4x₄ = 11 0 0 1 1.75 −2.5 → f ᇱ (x୧ ) = + h
−x₁ + 2x₂ + x₃ − 2x₄ = 13 x₁ + 2x₂ − 2x₃ − x₄ = 8 0 0 0 −24.75 49.5 h 2!
f ᇱᇱ (ξ)
−2x₁ + 4x₂ + 5x₃ − x₄ = 15 Normalize row 4 by dividing by -24.75 and eliminate above: truncation error = h = O(h)
The system of equations in matrix form is: 2!
First, form the augmented matrix: f(x୧ ) − f(x୧ିଵ )
2 1 −1 2 xଵ 0 1 0 0 −2.5 7 ← −(−2.5)[0 0 0 1 −2] → f ᇱ (x୧ ) = + O(h)
1 −2 1 −4 xଶ 3 0 1 0 2.5 −2 ← −(2.5)[0 0 0 1 −2] h
൦ ൪൦ ൪ = ൦ ൪ 4 3 2 1 17 ൦ ൪ =
3 −1 −2 −1 xଷ −3 2 −1 2 −4 11 0 0 1 1.75 −2.5 ← −(1.75)[0 0 0 1 −2] 8.1.3 Two-point central difference formula for first derivative
൦ ൪
−1 2 1 −2 xସ 13 1 2 −2 −1 8 0 0 0 1 −2 ←
ୟ ଵ ୟ ଷ ୟ ିଵ
1 0 0 0 2 f ᇱᇱ (x୧ ) ଶ f ᇱᇱᇱ (ξଵ ) ଷ
With mଶଵ = ୟమభ = ଶ = 0.5, mଷଵ = ୟయభ = ଶ = 1.5, mସଵ = ୟరభ = ଶ = −0.5, the −2 4 5 −1 15 f(x୧ାଵ ) = f(x୧ ) + f ᇱ (x୧ )h + h + h
భభ భభ భభ 0 1 0 0 3 2! 3!
first pass with Gaussian elimition yields: The pivot element aଵଵ = 4. Normalize row 1 by dividing by 4. ൦
0 0 1 0 1
൪ f ᇱᇱ (x୧ ) ଶ f ᇱᇱᇱ (ξଶ ) ଷ
f(x୧ିଵ ) = f(x୧ ) − f ᇱ (x୧ )h + h − h
2 1 −1 2 xଵ 0 1 0.75 0.5 0.25 4.25 ← 0 0 0 1 −2 2! 3!
2 −1 2 −4 11 ← −(2)[1 0.75 0.5 0.25 4.25] f ᇱᇱᇱ (ξଵ ) ଷ f ᇱᇱᇱ (ξଶ ) ଷ
0 −2.5 1.5 −5 xଶ 3 ൦ ൪ = Final solution: x₁ = 2, x₂ = 3, x₃ = 1, x₄ = −2 f(x୧ାଵ ) − f(x୧ିଵ ) = 2f ᇱ (x ୧ )h + h + h
൦ ൪൦ ൪ = ൦ ൪ 1 2 −2 −1 8 ← −(1)[1 0.75 0.5 0.25 4.25] 3! 3!
0 −2.5 −0.5 −4 xଷ −3
−2 4 5 −1 15 ← −(−2)[1 0.75 0.5 0.25 4.25] f(x୧ାଵ ) − f(x୧ିଵ ) f ᇱᇱᇱ (ξଵ ) f ᇱᇱᇱ (ξଶ ) ଶ
0 2.5 0.5 −1 xସ 13 Chapter 8: ᇱ (x )
→f ୧ = −ቆ + ቇh
ᇲ ᇲ
1 0.75 0.5 0.25 4.25 2h 2.3! 2.3!
ୟయమ ିଶ.ହ ୟరమ ଶ.ହ 8.1 Finite Difference Formulas of First Derivative
Next, with mଷଶ = = = 1, mସଶ = = = −1, the second pass with 0 −2.5 1 −4.5 2.5 f(x୧ାଵ ) − f(x୧ିଵ )
ୟᇲమమ ିଶ.ହ ୟᇲమమ ିଶ.ହ ൦ ൪ → f ᇱ (x୧ ) = + O(hଶ )
0 1,25 −2.5 −1.25 3.75 8.1.1 Two-point forward difference formula for first derivative 2h
Gaussian elimination yields:
0 5.5 6 −0.5 23.5 f ᇱᇱᇱ (ξଵ ) f ᇱᇱᇱ (ξଶ ) ଶ
2 1 −1 2 xଵ 0 f ᇱᇱ (x ୧ ) ଶ f ᇱᇱᇱ (x୧ ) ଷ f (ସ) (x ୧ ) ସ truncation error = − ቆ + ቇ h = O(hଶ )
Normalize row 2 by dividing by -2.5 and eliminate above/below: f(x୧ାଵ ) = f(x୧ ) + f ᇱ (x୧ )h + h + h + h +⋯ 2.3! 2.3!
0 −2.5 1.5 −5 xଶ 3 2! 3! 4!
൦ ൪൦ ൪ = ൦ ൪
0 0 −2 1 xଷ −6 1 0.75 0.5 0.25 4.25 ← −(0.75)[0 1 −0.4 1.8 −1] where h = x୧ାଵ − x୧ 8.1.4 Three-point forward and backward difference formulas for first derivative
0 0 2 −6 xସ 16 0 1 −0.4 1.8 −1 ←
൦ ൪ = Note: above is also Taylor series formula of f(x୧ାଵ ). Forward:
ᇲᇲ
ୟరయ ଶ 0 1,25 −2.5 −1.25 3.75 ← −(1.25)[0 1 −0.4 1.8 −1]
Next, with mସଷ = ୟᇲᇲ
= = −1, the third pass with Gaussian elimination 0 5.5 6 −0.5 23.5 ← −(5.5)[0 1 −0.4 1.8 −1] f ᇱᇱ (x୧ ) ଶ f ᇱᇱᇱ (ξଵ ) ଷ
యయ ିଶ Rewritten as:
yields: 1 0 0.8 −1.1 5 f(x୧ାଵ ) = f(x୧ ) + f ᇱ (x୧ )h + h + h
f ᇱᇱ (ξ) ଶ 2! 3!
0 1 −0.4 1.8 −1 f(x୧ାଵ ) = f(x୧ ) + f ᇱ (x୧ )h + h f ᇱᇱ (x୧ ) f ᇱᇱᇱ (ξଶ )
2 1 −1 2 xଵ 0 ൦
0 0 −2 −3.5 5
൪ 2! f(x୧ାଶ ) = f(x୧ ) + f ᇱ (x୧ )2h + (2h)ଶ + (2h)ଷ
0 −2.5 1.5 −5 xଶ 3 where ξ is a value of x between x୧ and x୧ାଵ 2! 3!
൦ ൪ ൦x ൪ = ൦ ൪ 0 0 8.2 −10.4 29 ᇱᇱ ᇱ
f ᇱᇱᇱ (ξଵ ) ଷ f ᇱᇱᇱ (ξଶ )
0 0 −2 1 ଷ −6 f(x୧ାଵ ) − f(x ୧ ) f (ξ) 4f(x୧ାଵ ) − f(x ୧ାଶ ) = 3f(x୧ ) + 2f (x୧ )h + 4 h − (2h)ଷ
0 0 0 −5 xସ 10 Normalize row 3 by dividing by -2 and eliminate above/below: → f ᇱ (x୧ ) = − h 3! 3!
h 2! 4f(x୧ାଵ ) − f(x ୧ାଶ ) = 3f(x୧ ) + 2f ᇱ (x୧ )h − 2hO(hଶ )
ଵ଴ ି଺ିଵ(ିଶ) f ᇱᇱ (ξ) −3f(x୧ ) + 4f(x୧ାଵ ) − f(x୧ାଶ )
Using back substitution, xସ = ିହ = −2, x ଷ = = 2, xଶ = truncation error = − h = O(h) f ᇱ (x୧ ) = + O(hଶ )
ଷି(ିହ)(ିଶ)ି(ଵ.ହ)(ଶ)
ିଶ
଴ି(ଶ)(ିଶ)ି(ିଵ)(ଶ)ି(ଵ)(ସ)
2! 2h
= 4, xଵ = = 1. Thus, the solution is f(x୧ାଵ ) − f(x ୧ )
ିଶ.ହ ଶ → f ᇱ (x୧ ) = + O(h) Similar, three point backward
[xଵ xଶ xଷ xସ ] = [1 4 2 −2] h

3f(x୧ ) − 4f(x୧ିଵ ) + f(x୧ିଶ ) f(x୧ାଵ ) − f(x୧ ) ௕


2-point O(h) Third derivative
f ᇱ (x୧ ) = + O(hଶ ) f ᇱ (x୧ ) = ‫ = )݂(ܫ‬න ݂(‫ݔ݀)ݔ‬
2h forward h Method Formula Truncatio ௔
Example 8-3: f(x) = x ଷ . Calculate the first derivative at point x = 3 numerically 3-point −3f(x୧ ) + 4f(x୧ାଵ ) − f(x୧ାଶ ) O(hଶ ) n Error = ݂(‫ݔ‬ଵ )(‫ݔ‬ଶ − ‫ݔ‬ଵ ) + ݂(‫ݔ‬ଶ )(‫ݔ‬ଷ − ‫ݔ‬ଶ ) + ⋯ + ݂(‫ݔ‬ே )(‫ݔ‬ேାଵ − ‫ݔ‬ே )
with the 3-point forward difference formula, using: f ᇱ (x୧ ) = ே
forward 2h 4-point ᇱᇱᇱ (x
−f(x୧ ) + 3f(x୧ାଵ ) − 3f(x୧ାଶ ) + f(x ୧ାଷ ) O(h) = ෍[݂(‫ݔ‬௜ )(‫ݔ‬௜ାଵ − ‫ݔ‬௜ )]
a. points x = 3, x = 4, x = 5 2-point f(x୧ ) − f(x୧ିଵ ) O(h) forward
f ୧) =
hଷ ௜ୀଵ
f ᇱ (x୧ ) =
x 3 4 5 backwar h When the subintervals have the same width h:
5-point f ᇱᇱᇱ (x୧ ) O(hଶ )
f′(x) 27 64 125 d
forward −5f(x୧ ) + 18f(x୧ାଵ ) − 24f(x୧ାଶ ) + 14f(x୧ାଷ ) ே

−3f(3) + 4f(4) − f(5) −3.27 + 4.64 − 125 3-point 3f(x୧ ) − 4f(x୧ିଵ ) + f(x୧ିଶ ) O(hଶ ) −3f(x୧ାସ ) ‫ = )݂(ܫ‬න ݂(‫ = ݔ݀)ݔ‬ℎ ෍ ݂(‫ݔ‬௜ )
f ᇱ (3) = = = 25 f ᇱ (x୧ ) = =
2.1 2 backwar 2h 2hଷ ௔ ௜ୀଵ
25 − 27 d 4-point −f(x୧ିଷ ) + 3f(x୧ିଶ ) − 3f(x୧ିଵ ) + f(x୧ ) O(h)
error = ฬ ฬ . 100% = 7.41% f ᇱᇱᇱ (x୧ ) = 9.2.1 Midpoint
27 2-point f(x ୧ାଵ ) − f(x୧ିଵ ) O(hଶ ) backwar hଷ
8.2 Finite Difference Formulas of Second Derivative f ᇱ (x୧ ) = d
௕ ௕
ܽ+ܾ ܽ+ܾ
central 2h ‫ = )݂(ܫ‬න ݂(‫ = ݔ݀)ݔ‬න ݂ ൬ ൰ ݀‫ ݂ = ݔ‬൬ ൰ (ܾ − ܽ)
௔ ௔ 2 2
8.2.1 Three-point central difference formula for the second derivative 4-point f(x୧ିଶ ) − 8f(x ୧ିଵ ) + 8f(x୧ାଵ ) − f(x୧ାଶ ) O(hସ ) 5-point f ᇱᇱᇱ (x୧ ) O(hଶ )
f ᇱ (x ୧ ) = backwar 3f(x ୧ିସ ) − 14f(x୧ିଷ ) + 24f(x୧ିଶ ) − 18f(x୧ିଵ ) 9.2.2 Composite Midpoint
central 12h
f ᇱᇱ (x ୧ ) ଶ f ᇱᇱᇱ (x୧ ) ଷ f (ସ) (x ୧ ) ସ d +5f(x୧ )
f(x୧ାଵ ) = f(x୧ ) + f ᇱ (x୧ )h + h + h + h +⋯ = Domain [ܽ, ܾ] is divided into N subintervals by ܰ + 1 points ‫ݔ‬ଵ , ‫ݔ‬ଶ , … , ‫ݔ‬ேାଵ
2! 3! 4! Second derivative 2hଷ
f ᇱᇱ (x ୧ ) ଶ f ᇱᇱᇱ (x୧ ) ଷ f (ସ) (x ୧ ) ସ where ‫ݔ‬ଵ = ܽ, ‫ݔ‬ேାଵ = ܾ
f(x୧ିଵ ) = f(x୧ ) − f ᇱ (x୧ )h + h − h + h +⋯ Method Formula Truncatio 4-point ᇱᇱᇱ
−f(x୧ିଶ ) + 2f(x ୧ିଵ ) − 2f(x୧ାଵ ) + f(x୧ାଶ ) O(hଶ ) ௕
2! 3! 4! n Error f (x୧ ) =
f ᇱᇱ (x୧ ) ଶ f (ସ) (x୧ ) ସ central 2hଷ ‫ = )݂(ܫ‬න ݂(‫ݔ݀)ݔ‬
f(x୧ାଵ ) + f(x୧ିଵ ) = 2f(x୧ ) + 2 h +2 h +⋯ f(x୧ ) − 2f(x ୧ାଵ ) + f(x୧ାଶ ) ௔
2! 4! 3-point ᇱᇱ (x O(h) 6-point f(x୧ିଷ ) − 8f(x୧ିଶ ) + 13f(x୧ିଵ ) − 13f(x୧ାଵ ) O(hସ ) ‫ݔ‬ଵ + ‫ݔ‬ଶ ‫ݔ‬ଶ + ‫ݔ‬ଷ
f(x୧ିଵ ) − 2f(x୧ ) + f(x୧ାଵ ) forward
f ୧) = = ݂൬ ൰ (‫ݔ‬ଶ − ‫ݔ‬ଵ ) + ݂ ൬ ൰ (‫ݔ‬ଷ − ‫ݔ‬ଶ ) + ⋯
f ᇱᇱ (x୧ ) = + O(hଶ ) hଶ central +8f(x୧ାଶ ) − f(x ୧ାଷ ) 2 2
hଶ f ᇱᇱᇱ (x୧ ) = ‫ݔ‬ே + ‫ݔ‬ேାଵ
4-point 2f(x୧ ) − 5f(x୧ାଵ ) + 4f(x୧ାଶ ) − f(x ୧ାଷ ) O(hଶ ) 8hଷ
8.2.2 Three-point forward and backward difference formula for the second +݂൬ ൰ (‫ݔ‬ேାଵ − ‫ݔ‬ே )
f ᇱᇱ (x୧ ) = 2
derivative forward hଶ ே
‫ݔ‬௜ + ‫ݔ‬௜ାଵ
Forward: 3-point f(x୧ିଶ ) − 2f(x୧ିଵ ) + f(x୧ ) O(h) Chapter 9: Integration = ෍[݂( )(‫ݔ‬௜ାଵ − ‫ݔ‬௜ )]
f ᇱᇱ (x୧ ) = 2
backwar hଶ ௜ୀଵ
f(x୧ ) − 2f(x ୧ାଵ ) + f(x୧ାଶ ) 9.1.1 Rectangle method
f ᇱᇱ (x୧ ) = + O(hଶ ) d When the subintervals have the same width h:
hଶ ௕ ௕
Backward: 4-point 2f(x୧ ) − 5f(x୧ିଵ ) + 4f(x୧ିଶ ) − f(x ୧ିଷ ) O(hଶ ) ‫ = )݂(ܫ‬න ݂(‫ = ݔ݀)ݔ‬න ݂(ܽ)݀‫ ܾ()ܽ(݂ = ݔ‬− ܽ) ௕ ே
f ᇱᇱ (x୧ ) = ‫ݔ‬௜ + ‫ݔ‬௜ାଵ
backwar hଶ ௔ ௔ ‫ = )݂(ܫ‬න ݂(‫ = ݔ݀)ݔ‬ℎ ෍ ݂( )
f(x୧ିଶ ) − 2f(x୧ିଵ ) + f(x୧ ) ௕ 2
f ᇱᇱ (x
୧) = + O(hଶ ) d ‫ = )݂(ܫ ݎ݋‬න ݂(ܾ)݀‫ ܾ()ܾ(݂ = ݔ‬− ܽ)
௔ ௜ୀଵ
hଶ ௔
3-point f(x୧ିଵ ) − 2f(x୧ ) + f(x୧ାଵ ) O(hଶ ) 9.3.1 Trapezoidal
f ᇱᇱ (x୧ ) = 9.1.2 Composite rectangle
central hଶ ௕ ௕
First derivative ݂(ܾ) − ݂(ܽ)
Domain [ܽ, ܾ] is divided into N subintervals by ܰ + 1 points ‫ݔ‬ଵ , ‫ݔ‬ଶ , … , ‫ݔ‬ேାଵ ‫ = )݂(ܫ‬න ݂(‫ = ݔ݀)ݔ‬න (݂(ܽ) + (‫ ݔ‬− ܽ) )݀‫ݔ‬
5-point f ᇱᇱ (x
୧) O(h ) ସ
௔ ௔ ܾ−ܽ
Method Formula Truncatio −f(x୧ିଶ ) + 16f(x୧ିଵ ) − 30f(x୧ ) + 16f(x୧ାଵ ) − f(x୧ାଶ ) where ‫ݔ‬ଵ = ܽ, ‫ݔ‬ேାଵ = ܾ
central 1 ݂(ܽ) + ݂(ܾ)
n Error = = ݂(ܽ)(ܾ − ܽ) + [݂(ܾ) − ݂(ܽ)](ܾ − ܽ) = (ܾ − ܽ)
12hଶ 2 2
9.3.2 Composite Trapezoidal ே ேିଵ ௕ ே

= ൥݂(ܽ) + 4 ෍ ݂(‫ݔ‬௜ ) + 2 ෍ ݂(‫ݔ‬௜ ) + ݂(ܾ)൩ ℎ = 0.6, ‫ = )݂(ܫ‬න ݂(‫ = ݔ݀)ݔ‬ℎ ෍ ݂(‫ݔ‬௜ ) = 0.6(0.5 + 0.8 + 2) = 1.98
Domain [ܽ, ܾ] is divided into N subintervals by ܰ + 1 points ‫ݔ‬ଵ , ‫ݔ‬ଶ , … , ‫ݔ‬ேାଵ 3 ௔
௜ୀଶ,ସ,଺,… ௜ୀଷ,ହ,଻,… ௜ୀଵ
where ‫ݔ‬ଵ = ܽ, ‫ݔ‬ேାଵ = ܾ
9.4.3 Simpson’s 3/8 method b. trapezoidal

‫ = )݂(ܫ‬න ݂(‫ݔ݀)ݔ‬ ௔ି௕ ேିଵ

Domain [ܽ, ܾ], 4‫ݏݐ݊݅݋݌‬: ‫ݔ‬ଵ = ܽ, ‫ݔ‬ସ = ܾ, ‫ݔ‬ଶ = ܽ + ℎ, ‫ݔ‬ଷ = ܽ + 2ℎ, ℎ = ℎ
ଷ ‫= )݂(ܫ‬ [݂(ܽ) + ݂(ܾ)] + ℎ ෍ ݂(‫ݔ‬௜ )
݂(‫ݔ‬ଵ ) + ݂(‫ݔ‬ଶ ) ݂(‫ݔ‬ଶ ) + ݂(‫ݔ‬ଷ ) ௕ 2
= (‫ݔ‬ଶ − ‫ݔ‬ଵ ) + (‫ݔ‬ଷ − ‫ݔ‬ଶ ) + ⋯ 3ℎ ௜ୀଶ
2 2 ‫ = )݂(ܫ‬න ݂(‫= ݔ݀)ݔ‬ [݂(ܽ) + 3݂(‫ݔ‬ଶ ) + 3݂(‫ݔ‬ଷ ) + ݂(ܾ)] 0.3
݂(‫ݔ‬ே ) + ݂(‫ݔ‬ேାଵ ) ௔ 8 ℎ = 0.3, ‫= )݂(ܫ‬ (0.5 + 4.8) + 0.3(0.6 + ⋯ + 3.2) = 3.165
+ (‫ݔ‬ேାଵ − ‫ݔ‬ே ) 2
2 9.4.4 Composite Simpson’s 3/8 method 0.6
ே ℎ = 0.6, ‫= )݂(ܫ‬ (0.5 + 4.8) + 0.6(0.8 + 2) = 3.27
1 2
= ෍[݂(‫ݔ‬௜ ) + ݂(‫ݔ‬௜ାଵ )](‫ݔ‬௜ାଵ − ‫ݔ‬௜ )] Domain [ܽ, ܾ] is divided into ܰ (ܰ ݅‫ ݕܾ ݈ܾ݁݅ݏ݅ݒ݅݀ ݏ‬3) subintervals with equal c. Simpson’s 3/8
2 ௕ି௔
௜ୀଵ width ℎ = by ܰ + 1 points ‫ݔ‬ଵ , ‫ݔ‬ଶ , … , ‫ݔ‬ேାଵ , where ‫ݔ‬ଵ = ܽ, ‫ݔ‬ேାଵ = ܾ,
ே ேିଵ ேିଶ
When the subintervals have the same width h: 3ℎ
௫ర ௫ళ ௫ಿశభ ‫= )݂(ܫ‬ ൥݂(ܽ) + 3 ෍ [݂(‫ݔ‬௜ ) + ݂(‫ݔ‬௜ାଵ )] + 2 ෍ ݂(‫ݔ‬௜ ) + ݂(ܾ)൩
ே ேିଵ ‫ = )݂(ܫ‬න ݂(‫ ݔ݀)ݔ‬+ න ݂(‫ ݔ݀)ݔ‬+ ⋯ + + න ݂(‫ݔ݀)ݔ‬ 8
௕ ௜ୀଶ,ହ,଼,… ௜ୀସ,଻,ଵ଴,…
ℎ ℎ ௔ ௫ర ௫ಿషమ 3 ∙ 0.3
‫ = )݂(ܫ‬න ݂(‫= ݔ݀)ݔ‬ ෍[݂(‫ݔ‬௜ ) + ݂(‫ݔ‬௜ାଵ )] = [݂(ܽ) + ݂(ܾ)] + ℎ ෍ ݂(‫ݔ‬௜ ) ேିଶ ℎ = 0.3, ‫= )݂(ܫ‬ [0.5 + 3(0.6 + 0.8 + 2 + 3.2) + 2 ∙ 1.3 + 4.8] = 3.116
௔ 2 2 ௫೔శయ
8
௜ୀଵ ௜ୀଶ
= ෍ න ݂(‫ݔ݀)ݔ‬ 3 ∙ 0.6
9.4.1 Simpson’s 1/3 method ௜ୀଵ,ସ,଻,… ௫೔ ℎ = 0.6, ‫= )݂(ܫ‬ [0.5 + 3(0.8 + 2) + 4.8] = 3.0825
8
௔ା௕ ௔ି௕ When the subintervals have the same width h:
Domain [ܽ, ܾ], ‫ݔ‬ଵ = ܽ, ‫ݔ‬ଷ = ܾ, ‫ݔ‬ଶ = ଶ
,ℎ = ଶ

3ℎ
ℎ ‫= )݂(ܫ‬ [݂(‫ݔ‬ଵ ) + 3݂(‫ݔ‬ଶ ) + 3݂(‫ݔ‬ଷ ) + ݂(‫ݔ‬ସ ) + ݂(‫ݔ‬ସ ) + 3݂(‫ݔ‬ହ ) + 3݂(‫) ଺ݔ‬
‫ = )݂(ܫ‬න ݂(‫ݔ(݂[ = ݔ݀)ݔ‬ଵ ) + 4݂(‫ݔ‬ଶ ) + ݂(‫ݔ‬ଷ )] 8
௔ 3 + ݂(‫ ) ଻ݔ‬+ ⋯ + ݂(‫ݔ‬ேିଶ ) + 3݂(‫ݔ‬ேିଵ ) + 3݂(‫ݔ‬ே ) + ݂(‫ݔ‬ேାଵ )]
ℎ ܽ+ܾ ேିଵ ேିଶ
= ൤݂(ܽ) + 4݂ ൬ ൰ + ݂(ܾ)൨ 3ℎ
3 2 = ൥݂(ܽ) + 3 ෍ [݂(‫ݔ‬௜ ) + ݂(‫ݔ‬௜ାଵ )] + 2 ෍ ݂(‫ݔ‬௜ ) + ݂(ܾ)൩
8
௜ୀଶ,ହ,଼,… ௜ୀସ,଻,ଵ଴,…
9.4.2 Composite Simpson’s 1/3 method
ଵ.଼
Domain [ܽ, ܾ] is divided into even number N subintervals with equal width ℎ = Problem 9.1: Compute ∫଴ ݂(‫ ݔ݀)ݔ‬with ℎ = 0.3 ܽ݊݀ ℎ = 0.6
௕ି௔

by ܰ + 1 points ‫ݔ‬ଵ , ‫ݔ‬ଶ , … , ‫ݔ‬ேାଵ , where ‫ݔ‬ଵ = ܽ, ‫ݔ‬ேାଵ = ܾ, x 0 0.3 0.6 0.9 1.2 1.5 1.8
௫య ௫ఱ ௫ಿశభ
f(x) 0.5 0.6 0.8 1.3 2 3.2 4.8
‫ = )݂(ܫ‬න ݂(‫ ݔ݀)ݔ‬+ න ݂(‫ ݔ݀)ݔ‬+ ⋯ + + න ݂(‫ݔ݀)ݔ‬
௔ ௫య ௫ಿషభ
ே ௫೔శభ
a. rectangle
= ෍ න ݂(‫ݔ݀)ݔ‬

௜ୀଶ,ସ,଺,… ௫೔షభ ௕
ℎ = 0.3, ‫ = )݂(ܫ‬න ݂(‫ = ݔ݀)ݔ‬ℎ ෍ ݂(‫ݔ‬௜ ) = 0.3(0.5 + 0.6 + ⋯ + 3.2) = 2.53
ℎ ௔
‫ݔ(݂[ = )݂(ܫ‬ଵ ) + 4݂(‫ݔ‬ଶ ) + ݂(‫ݔ‬ଷ ) + ݂(‫ݔ‬ଷ ) + 4݂(‫ݔ‬ସ ) + ݂(‫ݔ‬ହ ) + ⋯ + ݂(‫ݔ‬ேିଵ ) ௜ୀଵ
3
+ 4݂(‫ݔ‬ே ) + ݂(‫ݔ‬ଷ )]

You might also like