Numerical Methods 3
Upcoming SlideShare
Loading in...5
×
 

Numerical Methods 3

on

  • 1,028 views

Numerical Methods 3

Numerical Methods 3

Statistics

Views

Total Views
1,028
Views on SlideShare
1,028
Embed Views
0

Actions

Likes
0
Downloads
17
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Numerical Methods 3 Numerical Methods 3 Presentation Transcript

    • Numerical Methods - NumericalIntegrationN. B. VyasDepartment of Mathematics,Atmiya Institute of Tech. and Science, Rajkot (Guj.)niravbvyas@gmail.comN. B. Vyas Numerical Methods - Numerical Integration
    • Numerical IntegrationLet I =bay dx where y = f(x) takes the values y0, y1, . . . , yn forx0, x1, . . . , xnN. B. Vyas Numerical Methods - Numerical Integration
    • Numerical IntegrationLet I =bay dx where y = f(x) takes the values y0, y1, . . . , yn forx0, x1, . . . , xnLet us divide the interval (a, b) into n sub-intervals of width h sothat x0 = a, x1 = a + h = x0 + h, x2 = x0 + 2h, . . .,xn = x0 + nh = b thenN. B. Vyas Numerical Methods - Numerical Integration
    • Numerical IntegrationLet I =bay dx where y = f(x) takes the values y0, y1, . . . , yn forx0, x1, . . . , xnLet us divide the interval (a, b) into n sub-intervals of width h sothat x0 = a, x1 = a + h = x0 + h, x2 = x0 + 2h, . . .,xn = x0 + nh = b thenI =bay dx =x0+nhx0f(x) dxN. B. Vyas Numerical Methods - Numerical Integration
    • Numerical IntegrationLet I =bay dx where y = f(x) takes the values y0, y1, . . . , yn forx0, x1, . . . , xnLet us divide the interval (a, b) into n sub-intervals of width h sothat x0 = a, x1 = a + h = x0 + h, x2 = x0 + 2h, . . .,xn = x0 + nh = b thenI =bay dx =x0+nhx0f(x) dxTrapezoidal rule:b=x0+nha=x0f(x)dx =h2[(y0 + yn) + 2 (y1 + y2 + .... + yn)]; h =b − anIf the number of strips is increased; that is, h is decreased, thenthe accuracy of the approximation is increased.N. B. Vyas Numerical Methods - Numerical Integration
    • Numerical IntegrationSimpson’s13rd rule:N. B. Vyas Numerical Methods - Numerical Integration
    • Numerical IntegrationSimpson’s13rd rule:x0+nhx0f(x)dx = h3 [(y0 + yn) + 4(y1 + y3 + ....)+2(y3 + y4 + ....)]; h = b−anN. B. Vyas Numerical Methods - Numerical Integration
    • Numerical IntegrationSimpson’s13rd rule:x0+nhx0f(x)dx = h3 [(y0 + yn) + 4(y1 + y3 + ....)+2(y3 + y4 + ....)]; h = b−anwhile applying this rule, the given interval must be divided intoeven number of equal sub-intervals. i.e. n must be even.N. B. Vyas Numerical Methods - Numerical Integration
    • Numerical IntegrationSimpson’s13rd rule:x0+nhx0f(x)dx = h3 [(y0 + yn) + 4(y1 + y3 + ....)+2(y3 + y4 + ....)]; h = b−anwhile applying this rule, the given interval must be divided intoeven number of equal sub-intervals. i.e. n must be even.Simpson’s38th rule:N. B. Vyas Numerical Methods - Numerical Integration
    • Numerical IntegrationSimpson’s13rd rule:x0+nhx0f(x)dx = h3 [(y0 + yn) + 4(y1 + y3 + ....)+2(y3 + y4 + ....)]; h = b−anwhile applying this rule, the given interval must be divided intoeven number of equal sub-intervals. i.e. n must be even.Simpson’s38th rule:x0+nhx0f(x)dx = 3h8 [(y0 + yn) + 3(y1 + y2 + y4 + y5 + ....)+2(y3 + y6 + ....)]; h = b−anN. B. Vyas Numerical Methods - Numerical Integration
    • Numerical IntegrationSimpson’s13rd rule:x0+nhx0f(x)dx = h3 [(y0 + yn) + 4(y1 + y3 + ....)+2(y3 + y4 + ....)]; h = b−anwhile applying this rule, the given interval must be divided intoeven number of equal sub-intervals. i.e. n must be even.Simpson’s38th rule:x0+nhx0f(x)dx = 3h8 [(y0 + yn) + 3(y1 + y2 + y4 + y5 + ....)+2(y3 + y6 + ....)]; h = b−anwhile applying this rule, the number of sub-intervals should betaken as a multiple of 3 i.e. n must be multiple of 3N. B. Vyas Numerical Methods - Numerical Integration
    • Numerical IntegrationGaussian Integration Formula:1−1f(t)dt =ni=1wif(ti)It should be noted here that, t = ±1 is obtained by settingx =12[(b + a) + t (b − a)]N. B. Vyas Numerical Methods - Numerical Integration
    • Numerical IntegrationGaussian Integration Formula: The following table gives thevalues for n = 2, 3, 4, 5N. B. Vyas Numerical Methods - Numerical Integration
    • ExampleEx. Evaluate10e−x2dx by using Gaussion integration formula forn = 3.Sol. Here, we have to first convert the given integral from 0 to 1 intoan integral from −1 to 1. x = 12 [(b + a) + t (b − a)], a = 0 andb = 1∴ x =t + 12⇒ dx =dt2∴10exp(−x2)dx =121−1exp −14(t + 1)2 dtN. B. Vyas Numerical Methods - Numerical Integration
    • ErrorError in Quadrature Formula:If yp is a polynomial representing the function y = f(x) in theinterval [x0, xn] the error in the quadrature formula is given byE =xnx0f(x) =xnx0ypdxN. B. Vyas Numerical Methods - Numerical Integration
    • ErrorError in Trapezoidal rule:|error| ≤ (b − a)h212|f (M)|where f (M) = max |f 0(x)|, |f 1(x)|, ..., |f n−1(x)|∴ error is of order h2total error =dh312y 0 + y 1 + ... + y n−1N. B. Vyas Numerical Methods - Numerical Integration
    • ErrorError in Simpson’s13rd rule:|error| ≤ (b − a)h4180|f4(M)|where f4(M) = max |y40|, |y42|, ..., |y4n−2|∴ error is of order h4total error =h590y40 + y42 + ... + y4n−2N. B. Vyas Numerical Methods - Numerical Integration
    • ErrorError in Simpson’s38th rule:|error| ≤ (b − a)h480|f4(M)|where f4(M) = max |y40|, |y43|, ..., |y4n−3|∴ error is of order h4total error =3h580y40 + y43 + ... + y4n−3N. B. Vyas Numerical Methods - Numerical Integration