



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An in-depth exploration of numerical approximations for definite integrals using various methods such as left rule, right rule, midpoint rule, trapezoid rule, and taylor polynomials. It also covers the concepts of overestimates and underestimates, discretization errors, and round-off errors. Additionally, it introduces numerical integration of ordinary differential equations using euler's method, modified euler's method, and heun's method.
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!




MATH 250 ANumerical approximations Numerical approximations^ Calculus and Differential Equations I
∫^ b^ f^ (x)^ dx^ =a
n−^1 ∑ lim^ f^ (xi n→∞^ i= ) ∆x^ =^ lim n→∞
n∑^ f^ (x) ∆x,i^ i=
where ∆x^ = (
b^ −^ a)/n^ and
x=^ a^ +^ i^ ∆xi^
The left and right rules respectively approximate the integral
with LEFT(n) and RIGHT(
n), where n− LEFT(n) = (^1) ∑^ f^ (x) ∆x,^ i^ i=
RIGHT(n) =
n∑^ f^ (x) ∆x,i^ i=
with ∆x^ and^
xdefined as above.i^
Link to Geogebra Numerical approximations
Calculus and Differential Equations I
f^ at the midpoint between
xand^ x:i^ i+ n− MID(n) = (^1 ∑x+^ xi^ i+1 f^2 i= )^ ∆x.
The trapezoid rule approximates the area under the graph of
f
between^ xandi^
xwith the area of the correspondingi+^ trapezoid:TRAP(
(^ n− (^1) ∑f^ (n) = i= x) +^ f^ (x)i^ i+1^2
)^ ∆x.
From the above formula, one can see thatTRAP(
(^1) n) = (LEFT( 2 n) + RIGHT(
n))^. Numerical approximations
Calculus and Differential Equations I
f^ is increasing between
a^ and^ b^ and that we approximate^ I
∫^ b = f^ (x)^ dxa^ with LEFT(n
). Which of the
following statements is correct?^1 LEFT(n) is an underestimate^2 LEFT(n) is an overestimate^3 LEFT(n) is exact 2 If^ f^ is increasing on [
a,^ b], then^ ∫^ b LEFT(n) ≤^ f^ (x)^ dxa
≤^ RIGHT(n)
3 Similarly, if
f^ is decreasing on [
a,^ b], then RIGHT(n)^ ≤
∫^ b^ f^ (x)^ dx^ ≤a
LEFT(n). Numerical approximations
Calculus and Differential Equations I
n) is an overestimate, which of the following requirements do we need?^1 f^ is increasing^2 f^ is concave up^3 f^ is concave down^4 f^ is decreasingIf^ f^ is concave up on [
a,^ b], then^ ∫^ b MID(n) ≤^ f^ (x)^ dx^ a
≤^ TRAP(n). Similarly, if^ f^
is concave down on [
a,^ b], then ∫ TRAP(n) ≤ b^ f^ (x)^ dx^ ≤^ a
MID(n). Numerical approximations
Calculus and Differential Equations I
f^ is positive, decreasing, and concave down on [
a,^ b]. Let^ I^ =
∫^ b^ f^ (x)^ dx. a Assume that the values of LEFT(10), RIGHT(10), TRAP(10),and MID(10) are, in random order, given by
Use the above to assign a value to each of LEFT(10),RIGHT(10), TRAP(10), and MID(10).Then, indicate which of the statements below is correct:^1 0.^703 ≤^ I
≤^0.^7242 0. 724 ≤ I ≤^0.^7353 0. 735 ≤ I ≤^0.^745 Numerical approximations
Calculus and Differential Equations I
I^ , we define the absolute error
E(n), asL E(n) =^ I^ −^ LEFT(L
n). One can show that
|E(n)|^ and^ |L
E(n)|^ are^ linear functions ofR^ 1 /n. Similarly,^ |ET
(n)|^ and^ |E M^ (n)|^ decrease quadratically as
n^ is
increased.This can be improved by using Simpson’s rule, given by^ SIMP
(^1) (n) = (2 MID( 3 n) + TRAP(n
One can show that the error
|E(n)|^ decreases like 1S^
(^4) /n.
Numerical approximations
Calculus and Differential Equations I
dy=^ g^ (x,^ y^ )dx^ The above differential equation may formally be integrated as^ y^ (
x^ +^ h)^ −^ y^ (x) =
∫^ x+h^ g^ (t,^ y^ (t x
))^ dt.
If we know^ y^ (
x), a numerical approximation of
y^ (x^ +^ h) may
thus be obtained by finding an estimate of the integral in theright-hand-side of the above equation.Euler’s method consists in assuming that
g^ (t,^ y^ (t)) is
constant on the interval [
x,^ x^ +^ h], and equal to
g^ (x,^ y^ (x)),
where^ x^ is the left end-point of the interval.We thus have
y^ (x^ +^ h)^ ^ y^
(x) +^ h g^ (x,^ y
(x)). Numerical approximations
Calculus and Differential Equations I
n, centered at
x^ =^ a, of a
function^ f^ is given by P(x) =^ f^ (a) + (x^ −n
(x^ −′ a)f (a) + (^2) a)′′f^ (a) +^ · · · 2!
n(x − a)( + f^ n! n)(a).
Of course, the above assumes that
f^ has is at least
n^ times
differentiable near
a. In what follows, we assume that
f^ is
smooth, for simplicity.One can show that the error made by replacing
f^ by its Taylor
polynomial of degree
n^ is given by f^ (x) =^ P(x) +n
R(x),^ Rn
(x^ −^ a(x) = n n+1)(n+1)f^ (ξ) (n + 1)!^
where^ ξ^ ∈^ (a,
x).
Link to d’Arbeloff Taylor Polynomials software Numerical approximations
Calculus and Differential Equations I
∫^ n− 1 x∑i+1 =^ xi i= f^ (x)^ dx,^ xi^
=^ a^ +^ i∆x,^
b^ −^ a∆x = .n^
For the left rule, for each
x^ ∈^ [x,^ x], we havei^ i+ f^ (x) =^ f^ (x) + (i^
′x − x) f (ξ(xi )),^ ξ(x)^ ∈
(x,^ x).i^
From this formula, we see that if
′^ f is positive and bounded by M between
xand^ x, theni^ i+1^0 ≤^ f^ (x)^ −^
f^ (x)^ ≤^ M(x^ i^
−^ x),i^
which gives that LEFT is an underestimate and ∣∫^ xi+1∣∣^ f^ (x)^ dx∣^ xi
∣∣∣ − f (x) ∆xi ∣^ ∫^ xi+1≤^ M^ (x^ xi −x)^ dx^ =^ M^ i^
(^2) (∆x). 2
Numerical approximations
Calculus and Differential Equations I
x+^ xi^ i+1 m = 2
f^ (x) =^ f^ (m)+(
′m−x) f (m)+ 12 ′′(x^ −m)f^ ( 2
ξ(x)),^ ξ(
x)^ ∈^ (x,^ x).i^
We can check that^ ∫^ xi+1^ xi
(f^ (m) + (m^ −
)^ ′ x) f (m)dx^ =^ f^ (m) ∆x, ′′^ so that if f is positive and bounded by M between
xandi^
x, theni+1^0 ≤^ f^ (x
[) − f^ (m) + (
′m − x) f (m) ]^ M≤^ (x^ −^ m^2
which gives that MID is an underestimate and that the larger′′ |f^ |, the larger the error.^ Numerical approximations
Calculus and Differential Equations I
f^ (x)^ dx^ = [(x
xi+1 − m)f (x)] xi^ ∫^ xi+1−^ (x^ −^ xi
′m) f (x)^ dx.
We can use a Taylor expansion for
′ f (x) near^ x^ =^ m^ to see
′′^ that if f is positive between
xand^ x, then TRAP gives ani^ i+ overestimate.Moreover, the error over an interval of length ∆
x^ is bounded (^3) by M(∆x)/12, where M^ is the maximum of
′′ |f |^ over that
interval.For all of these methods, if the error on the integral between xand^ xis of order (∆i^ i+^
p+1x), then the error on the integral between^ a^ and
b^ is of order 1
p^ /n, where^ n^ is the number of
sub-intervals.^ Numerical approximations
Calculus and Differential Equations I
h^ →^ 0. A numerical method is convergent if the global discretizationerror goes to zero as
h^ →^ 0. Typically, one uses Taylor expansions to decide whether anumerical method is consistent and convergent.A numerical method may also be unstable, in the sense that anumerical solution to
′^ y =^ λy^ with λ <^ 0 can display growth. These are topics typically discussed in an introductory courseon numerical analysis, such as MATH 475.Finally, one should keep in mind that a numerical method is amap of the form
y=^ G^ (yn+1^ n
,^ n), and that if
G^ is nonlinear,
chaos may be observed.
Link to Chaos on the Web Numerical approximations
Calculus and Differential Equations I