Web-Books
im Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition
Seite - 134 -
  • Benutzer
  • Version
    • Vollversion
    • Textversion
  • Sprache
    • Deutsch
    • English - Englisch

Seite - 134 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Bild der Seite - 134 -

Bild der Seite - 134 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Text der Seite - 134 -

134 6 ComputingIntegralsandTestingCode 6.2 TheCompositeTrapezoidalRule The integral ∫b a f(x)dx may be interpreted as the area between thex axis and the graphy=f(x)of the integrand.Figure6.1illustrates thisareafor thecase in(6.7). Computing the integral ∫1 0 v(t)dt amounts to computing the area of the hatched region. If we replace the true graph in Fig.6.1 by a set of straight line segments, we may view the area rather as composed of trapezoids, the areas of which are easy to compute. This is illustrated in Fig.6.2, where four straight line segments give rise to four trapezoids, covering the time intervals [0,0.2), [0.2,0.6), [0.6,0.8) and [0.8,1.0]. Note that we have taken the opportunity here to demonstrate the computationswith time intervals thatdiffer in size. Theareasof thefour trapezoidsshowninFig.6.2nowconstituteourapproxima- tion to the integral (6.7): ∫ 1 0 v(t)dt ≈h1(v(0)+v(0.2) 2 )+h2(v(0.2)+v(0.6) 2 ) +h3(v(0.6)+v(0.8) 2 )+h4(v(0.8)+v(1.0) 2 ), (6.9) where h1 = (0.2−0.0), (6.10) h2 = (0.6−0.2), (6.11) Fig. 6.1 The integral ofv(t) interpreted as the area under the graph ofv
zurück zum  Buch Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition
Titel
Programming for Computations – Python
Untertitel
A Gentle Introduction to Numerical Simulations with Python 3.6
Band
Second Edition
Autoren
Svein Linge
Hans Petter Langtangen
Verlag
Springer Open
Datum
2020
Sprache
englisch
Lizenz
CC BY 4.0
ISBN
978-3-319-32428-9
Abmessungen
17.8 x 25.4 cm
Seiten
356
Schlagwörter
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Kategorie
Informatik
Web-Books
Bibliothek
Datenschutz
Impressum
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python