Taylor Series

In the last section we approximated f(x) at a value x0 by its linearization (a straight line). The linear approximation

T1(x) = f(x0) + f'(xx0)

agrees with both f(x0) and f'(x0) at the value x0, and it approximates f(x) near x0.

To better approximate the graph of f at the neighborhood of a point (x0, f(x0)), we must use a curve that has the same concavity as the graph of f. As we knwow the second f'' derivative of a function captures curvature information of a function. Let us find a polynomial T2(x) with derivatieves at x0 that agree with those of f up to order 2. We can try a parabolic approximation defined by

T2(x) = f(x0) + f'(xx0) + c2(xx0)2

where c2 is to be determined and such that

T2(x0) = f(x0),   T'(x0) = f'(x0)  and  T''(x0) = f''(x0)

By direct differentiation we get T''2(x0) = 2c2. So we choose c2 = f''(x0)/2. Then

T2(x) = f(x0) + f'(xx0) + f''(x0)/2(xx0)2

which is a quadratic, or parabolic, approximation.

Let f(x) = cos x. We have

f(x0) = cos(0) = 1,   f'(x0) = −sin(0) = 0  and  f''(x0) = −cos(0) = −1

Then T2(x) = 1 − x2/2.

cos quadratic approximation

The function cos x is approximated by the parabola y = 1 − x2/2 better off than its tangent line y = 1, for x → 0: Indeed, the difference between f and this polynomiral is o(x2), i.e. tends to zero more rapidly than x2 (and not only more rapidly x).

To do even better, we can try to add a cubic term to make the the 3rd derivative equal as well. So let

T3(x) = f(x0) + f'(xx0) + f''(x0)/2(xx0)2 + c3(xx0)3

Requiring that T''(x0) = f'''(x0) forces T'''(x0) = 3 ⋅ 2 c3 = f'''(x0) which means that c3 = 1/(2⋅3)f'''(x0). Therefore

T3(x) = f(x0) + f'(xx0) + f''(x0)/2(xx0)2 + f'''/3⋅2 (xx0)3

which is called the cubic approximation. We can continue this process indefinetly, assuming that f has the required derivatives, to obtain

T n , x 0 ( x ) = k = 0 n f k ( x 0 ) k ! ( x x 0 ) k

which is called nth-degree Taylor polynomial of f at x0.

So by supposing that f is any function that can be represented by a power series

f(x) = c0 + c1(xa) + c2(xa)2 + c3(xa)3 + ...,   |xa| < R

è interessante notare che i coefficienti ci possono essere espressi in termini dei valori di f e delle sue derivate in a. Se x=a, tutti i termini eccetto il primo si annullano e risulta:

f(a) = c0

per ottenere il coefficiente c1 deriviamo ambo i membri della (4.0)

f'(x) = c1 + 2c2(xa) + 3c3(xa)3 + ...,   |xa| < R

again in x = a we have:

f'(a) = c1

derivando la (4.1) abbiamo:

secondo coefficiente polinomio

determiniamo il terzo coefficiente ponendo x=a

f ''(a) = 2c2

In generale la relazione tra coefficienti della serie di potenze e le derivate di f è la seguente:

coefficiente polinomio taylor

Definizione 5.1 (Polinomio di Taylor) - Data una funzione derivabile n volte in un punto x0 definiamo il seguente polinomio:

polinomio di Taylor all'ordine n

noto come polinomio di Taylor di grado n.

Notiamo che il polinomio Tn solitamente è proprio di grado n, ma può acere grado minore se f(n) (0) = 0.

Il prossimo teorema afferma che è possibile approssimare la funzione f con il suo polinomio di Taylor, localmente nell'itorno di x0.

Teorema 4.3 - (Formula di Taylor all'ordine n con resto secondo Peano). Let f:(a,b) → ℝ dervabile n volte in x0 ∈ (a,b). Allora, vale la relazione

f(x) = Tn,x0 + o(xx0),   xx0

detta Formula di Taylor. Dove

Polinomio di taylor

La formula ha la struttura:

funzione da approssimare = polinomio approssimante + approximation error

Proof. It suffices to prove that

dimostrazione formula di taylor

si tratta di una forma indeterminata del tipo 0/0, applicando il teorema di de L'Hopital ottemiamo il limite:

hopital dimostrazione taylor

questa è ancora una forma indeterminata così come per n ≥ 1. Reiterando n-1 volte l'applicazioen di l'Hopital sinchè non giungiamo al limite:

dimostrazione taylor

dalla definizione di derivata segue che il limite è nullo.

For the special case x0 = 0 the Taylor series becomes, what is known as a MacLuarin's series

sviluppi di MacLuarin

Teorema 4.4 - (Formula di Taylor all'ordine n con resto di Lagrange). Si supponga che f ∈ C n+1[a,b] e sia x0 un punto fissato di [a,b]. Per ogni x ∈ (a,b), esiste un numero ξ compreso tra x0 e x tale che

formula di taylor resto Lagrange (7.9)

La formula precedente si dice "formula di Taylor, di ordine n, con resto di Lagrange".

Per n=0 la (7.9) coincide col Teorema di Lagrange. Si noti che il punto c dipende da x0, x e n, ed è compreso tra x0 e x.

«The Linear Approximation Index Peculiarities of the 4th declension »