Web-Books
in the Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Page - 82 -
  • User
  • Version
    • full version
    • text only version
  • Language
    • Deutsch - German
    • English

Page - 82 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Image of the Page - 82 -

Image of the Page - 82 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Text of the Page - 82 -

82 3 Computing Integrals andwant to approximate the integral by amidpoint rule. Following the ideas for thedouble integral,wesplit this integral intoone-dimensional integrals: p.x;y/D fZ e g.x;y;z/dz q.x/D dZ c p.x;y/dy bZ a dZ c fZ e g.x;y;z/dzdydxD bZ a q.x/dx Foreachof theseone-dimensional integralsweapply themidpoint rule: p.x;y/D fZ e g.x;y;z/dz nz 1X kD0 g.x;y;zk/; q.x/D dZ c p.x;y/dy ny 1X jD0 p.x;yj/; bZ a dZ c fZ e g.x;y;z/dzdydxD bZ a q.x/dx nx 1X iD0 q.xi/; where zk D eC 1 2 hz Ckhz; yj DcC 1 2 hy Cjhy xi DaC 1 2 hx C ihx : Starting with the formula for Rb a Rd c Rf e g.x;y;z/dzdydx and inserting the two previous formulasgives bZ a dZ c fZ e g.x;y;z/dzdydx hxhyhz nx 1X iD0 ny 1X jD0 nz 1X kD0 g aC 1 2 hx C ihx;cC 1 2 hy Cjhy;eC 1 2 hz Ckhz : (3.26) Note thatwemay apply the ideasunderDirect derivation at the endofSect. 3.7.1 to arrive at (3.26) directly: divide the domain intonx ny nz cells of volumes hxhyhz; approximategbyaconstant, evaluatedat themidpoint.xi;yj;zk/, ineach cell; andsumthecell integralshxhyhzg.xi;yj;zk/.
back to the  book Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python
Title
Programming for Computations – Python
Subtitle
A Gentle Introduction to Numerical Simulations with Python
Authors
Svein Linge
Hans Petter Langtangen
Publisher
Springer Open
Date
2016
Language
English
License
CC BY-NC 4.0
ISBN
978-3-319-32428-9
Size
17.8 x 25.4 cm
Pages
248
Keywords
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Category
Informatik
Web-Books
Library
Privacy
Imprint
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python