U2 Nov2023

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Calculus and Numerical Methods.

Unit 2. 23 November 2023


Full name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1. (2.5 p.) We consider the line in the plane 2x + y + 10 = 0.

a) Find the minimum distance from the origin (0, 0) to the line.
b) Find the maximum distance from the origin to the points on the line between (−5, 0) and
(0, −10) (including both endpoints).

2. We define the function f (x) = 1 + x.

a) (1.5 p.) Compute the 4-order Maclaurin polynomial of f and use it to approximate 1.2.
b) (1 p.) Find an upper bound on the error of the approximation of part a).

3. (2 p.) We consider the function f (x) = ex .

a) Compute the table of divided differences for the following values of f .


xi −1 −0.5 0
f (xi ) 0.36788 0.60653 1.00000
b) Approximate e−0.6 by linear and quadratic interpolation using the values of the table.
c) Find an upper bound on the error of the linear approximation of part b).

4. Let us consider the equation


x + log(x) = 4
and the function f (x) = x + log(x) − 4 defined for x > 0.

a) (0.5 p.) Show that there is only a positive solution to the equation, p. Find a 1-length
interval [a, a + 1], with a ∈ Z, where p is.
b) (1 p.) By the bisection method, find an approximation of p with an error of 0.08. How
many iterations are needed to find the approximation up to an error of 10−7 ?
c) (1.5 p.) Verify that we can use the Newton’s method to approximate p and then find an
estimate of p up to an error of 10−7 .
Formulas
Taylor’s formula with remainder (order n around a):
!
f ′ (a) f (2) (a) f (n) (a) f (n+1) (c)
f (x) = f (a) + (x − a) + (x − a)2 + · · · + (x − a)n + · (x − a)n+1
1! 2! n! (n + 1)!

where c is between a and x.

Polynomial interpolation: error for the points x0 < x1 < . . . < xn :

f (n+1) (c)
· (x − x0 )(x − x1 ) · · · (x − xn )
(n + 1)!

where c ∈ (x0 , xn ) and x is a point in (x0 , xn ).

Bisection method: an upper bound for the error


b−a
2n

Newton’s method: the iteration formula


f (pn−1 )
pn = pn−1 − , ∀n ≥ 1 .
f ′ (pn−1 )

Theorem: If f is two times differentiable on [a,b], and

(a) f (a) · f (b) < 0,


(b) f ′ (x) ̸= 0, ∀x ∈ [a, b],
(c) f ′′ (x) ≥ 0, ∀x ∈ [a, b] or f ′′ (x) ≤ 0, ∀x ∈ [a, b],

then (pn ) is convergent to the root if p0 ∈ [a, b] verifies f (p0 ) · f ′′ (p0 ) > 0.
Upper bound for the error :
M
|pn − pn−1 |2
|p − pn | ≤
2m
where m is a positive lower bound of |f ′ | on [a, b] and M an upper bound of |f ′′ | on [a, b].

You might also like