Numerical Integration.docx

  • Uploaded by: AFERNU-EYO NYONG
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Numerical Integration.docx as PDF for free.

More details

  • Words: 915
  • Pages: 9
NUMERICAL INTEGRATION: Trapezoidal rule Numerical integration simply means the numerical evaluation of 𝒃

integrals 𝑰 = βˆ«π’‚ 𝒇(𝒙)𝒅𝒙 Where a and b are given and f(x) is a function given analytically by a formula or empirically by a table of values. We can represent geometrically, I as the area under the curve of f(x) between a and b as shown

Fig 1. Graphical depiction of the trapezoidal rule. Geometrically, the trapezoidal rule is equivalent to approximating the area of the trapezoid under the straight line connecting f (a) and f (b) in fig 1. Recall from geometry that the formula for computing the area of a trapezoid is the height times the average of the bases (Fig2a). In our case, the concept is the same but the trapezoid is on its side (Fig.2b). Therefore, the integral estimate can be represented as I ∼= width Γ— average height

(a) The formula for computing the area of a trapezoid: height times the average of the bases. (b) For the trapezoidal rule, the concept is the same but the trapezoid is on its side or I ∼= (b βˆ’ a) Γ— average height where, for the trapezoidal rule, the average height is the average of the function values at the end points, or [ f (a) + f (b)]/2.

Generally; Trapezoidal π’™πŸŽ +𝒏𝒉

𝑰=∫ π’™πŸŽ

𝒇(𝒙)𝒅𝒙 =

rule

is

given

as

𝒉 [(π’šπŸŽ + π’šπ’ ) + 𝟐(π’šπŸ + π’šπŸ + β‹― + π’šπ’βˆ’πŸ )] 𝟐

𝒃

RULES FOR EVALUATING USING βˆ«π’‚ 𝒇(𝒙)𝒅𝒙 TRAPEZOIDAL RULE OR SIMPSON’S RULE 𝒃 1. Compare the given definite integral, say I, with βˆ«π’‚ 𝒇(𝒙)𝒅𝒙 to get the values of f(x) and limits a, b, π’ƒβˆ’π’‚ 2. Compute h= , where n denotes the number of sub-intervals 𝒏 for the problem. 3. Find the values of y=f(x), corresponding to π’™πŸŽ = 𝒂, π’™πŸ = 𝒂 + 𝒉, π’™πŸ = π’™πŸŽ + πŸπ’‰, … . , 𝒙𝒏 = π’™πŸŽ + 𝒏𝒉 = 𝒃 𝒂𝒏𝒅 𝒅𝒆𝒏𝒐𝒕𝒆 𝒕𝒉𝒆𝒔𝒆 𝒗𝒂𝒍𝒖𝒆𝒔 𝒂𝒔 π’šπŸŽ , π’šπŸ , π’šπŸ , … . . , π’šπ’. . 4. Apply the specified rule to calculate I (either Trapezoidal rule or Simpson’s rule).

By trapezoidal rule, we have π’™πŸŽ +𝒏𝒉

𝒇(𝒙)𝒅𝒙 =

𝑰=∫ π’™πŸŽ

𝒉 [(π’šπŸŽ + π’šπ’ ) + 𝟐(π’šπŸ + π’šπŸ + β‹― + π’šπ’βˆ’πŸ )] 𝟐 𝟏

Example: Use Trapezoidal Rule to evaluate ∫𝟎 π’™πŸ‘ 𝒅𝒙 considering 5 subintervals. 𝟏

Sol. Let 𝑰 = ∫𝟎 π’™πŸ‘ 𝒅𝒙. h=0.2, f(x) = π’™πŸ‘

Trapezoidal rule is given by 𝒉 𝑰 = [(π’šπŸŽ + π’šπ’ ) + 𝟐(π’šπŸ + π’šπŸ + β‹― + π’šπ’βˆ’πŸ )] 𝟐 Putting the values in the above equation, we have 𝟏

𝑰 = ∫ π’™πŸ‘ 𝒅𝒙 𝟎

𝟎. 𝟐 [(𝟎 + 𝟏) + 𝟐(𝟎. πŸŽπŸŽπŸ– + 𝟎. πŸŽπŸ”πŸ’ + 𝟎. πŸπŸπŸ” 𝟐 + 𝟎. πŸ“πŸπŸ)] =

x y=f(x)

0 π’šπŸŽ =𝟎

0.2 0.4 0.6 0.8 1.0 π’šπŸ =0.008 π’šπŸ =0.064 π’šπŸ‘ =0.216 π’šπŸ’ =0.512 π’šπŸ“ =1

=0.26

NUMERICAL INTEGRATION: Simpson’s rule Another way to obtain a more accurate estimate of an integral is to use higher-order polynomials to connect the points. For example, if there is an extra point midway between f (a) and f (b), the three points can be connected with a parabola (Fig. 3a). If there are two points equally spaced between f (a) and f (b), the four points can be connected with a third-order polynomial (Fig.3b). The formulas that result from taking the integrals under these polynomials are called Simpson’s rules.

(a) Graphical depiction of Simpson’s 1/3 rule: It consists of taking the area under a parabola connecting three points. (b) Graphical depiction of Simpson’s 3/8 rule: It consists of taking the area under a cubic equation connecting four points. 𝟏 For Simpson’s rule, the following formula applies; πŸ‘

π’™πŸŽ +𝒏𝒉

∫ π’™πŸŽ

𝒇(𝒙)𝒅𝒙 𝒉 [(π’šπŸŽ + π’šπ’ ) + πŸ’(π’šπŸ + π’šπŸ‘ + β‹― + π’šπ’βˆ’πŸ ) + 𝟐(π’šπŸ + π’šπŸ’ πŸ‘ + β‹― + π’šπ’βˆ’πŸ )] =

𝟏 𝒅𝒙

Example: Evaluate ∫𝟎

𝟏

rule taking h=0.25 𝟐 dx using Simpson’s

𝟏+𝒙

πŸ‘

𝟏

𝑰=∫ 𝟏

f(x) =

𝟏+π’™πŸ

𝟎

, h=0.25

x y =f(x) 𝟏 𝒅𝒙

𝑰 = ∫𝟎

𝒅𝒙 𝒉 [(π’šπŸŽ + π’šπŸ’ ) + πŸ’(π’šπŸ + π’šπŸ ) + πŸπ’šπŸ ] = 𝟏 + π’™πŸ πŸ‘

𝟏+π’™πŸ

0 π’šπ’ =1 =

𝟎.πŸπŸ“ πŸ‘

0.25 0.50 π’šπŸ =0.9412 π’šπŸ =0.8

0.75 π’šπŸ‘ =0.64

1.00 π’šπŸ’ =0.5

[(𝟏 + 𝟎. πŸ“) + πŸ’(𝟎. πŸ—πŸ’πŸπŸ + 𝟎. πŸ”πŸ’) + 𝟐 Γ— 𝟎. πŸ–]

= 0.7854

CLASSWORK 1. Given that x 4.0 4.2 4.4 4.6 4.8 5.0 5.2 lo 1.3863 1.4351 1.4816 1.5261 1.5686 1.6094 1.6487 gx πŸ“.𝟐

𝟏 πŸ‘

Evaluate βˆ«πŸ’ π’π’π’ˆ 𝒙 𝒅𝒙 by (i) Trapezoidal Rule (ii) Simpson’s Rule ANSWERS: (i) 1.82766 (ii)1.82785 πŸ’

2. Evaluate ∫𝟎 𝒆𝒙 π’ƒπ’š π‘Ίπ’Šπ’Žπ’‘π’”π’π’β€² 𝒔𝑹𝒖𝒍𝒆 π’ˆπ’Šπ’—π’†π’ 𝒕𝒉𝒂𝒕 𝒆 = 𝟐. πŸ•πŸ, π’†πŸ = πŸ•. πŸ‘πŸ—, π’†πŸ‘ = 𝟐𝟎. πŸŽπŸ—, π’†πŸ’ = πŸ“πŸ’. πŸ” ANSWER:53.87 3. A curve is drawn to pass through the points given by the following table: x 1 1.5 2 2.5 3.0 3.5 4.0 y 2 2.4 2.7 2.8 3 2.6 2.1 Estimate the area bounded by the curve, x-axis and the line x=1 and x=4. ANSWER : Area= 7.78 square units 4. The following table gives the velocity v of a particle at time t:

t(seconds) 0 2 4 6 8 10 v(m/sec) 4 6 16 34 60 94 Find the distance moved by the particle in 12 secs. ANSWER: S= 552 m. 𝝅⁄ ∫𝟎 𝟐 π’†π’”π’Šπ’π’™

5. calculate Trapezoidal rule

12 136

𝒅𝒙 correct to four decimal places by

Related Documents

Numerical
December 2019 24
Numerical
October 2019 21
Numerical
May 2020 7
Numerical
November 2019 26
Numerical Exam
June 2020 2

More Documents from "Pravat Satpathy"

Isi Recv (2).docx
May 2020 0
Lab 8.docx
May 2020 0
Gec320 1.pdf
May 2020 0