22
Taylor series Denny Vitasari 10 March 2015 Denny Vitasari Taylor series

Numerical Methods 3

Embed Size (px)

DESCRIPTION

analisis numeris

Citation preview

  • Taylor series

    Denny Vitasari

    10 March 2015

    Denny Vitasari Taylor series

  • Case study

    Figure: Tacoma Narrows Bridge, 1 July 7 November 1940

    Denny Vitasari Taylor series

  • Case Study

    The original Tacoma Narrow Bridge in Washington, US was openedon 1 July 1940 and collapsed in the morning of 7 November 1940under high wind conditions.

    At the time it was the third longest bridge in the world.The collapse was caused by torsional twisting from side-to-side.Engineers, architects, and physicists attempted to determinethe cause of the collapse.One of the model considered two dimensional slides, ignoringthe dimensional length of the bridge, interested only on theside-to-side motion.This approximation needs a knowledge on local behaviours ofthe function involved.

    Denny Vitasari Taylor series

  • Taylor polynomial

    Taylor polynomials give a convenient way to describe the localbehaviour of a function, by encapsulating its first several derivativesat a point.

    Good approximation needs a good knowledge on the error.Error: Taylor polynomial vs the exact value.Question on Taylor theorem: to what extent do the derivativesof a function at a single point dictate the behaviour of thefunction at nearby points?

    Denny Vitasari Taylor series

  • Taylor series are used to estimate the value of functions (at leasttheoretically - nowadays we can usually use a calculator orcomputer to calculate directly.)

    Figure: f (x) = x2sin(x/2) and tangent line.

    Denny Vitasari Taylor series

  • The mean value theorem

    The derivative of a function at a point is the slope of that functionon that point.

    Figure: f (x) = x2sin(x/2) and f (x) at x = 2

    Denny Vitasari Taylor series

  • The slope of a line between a and b on the graph of y = f (x) isequal to the derivative of f (x) somewhere between the two points.

    In other words, take c as a point between a and b:

    f (c) =f (b) f (a)

    b a

    Denny Vitasari Taylor series

  • Rearrange the equation:

    f (b) f (a) = f (c)(b a)

    Denny Vitasari Taylor series

  • Taylor theorem

    If f (x) is differentiable on an open interval I containing a then forany x in I :

    f (x) = f (a) + (x a)f (c)for some c between a and x . If x is close to a, then c is also closeto a, and we can approximate:

    f (x) f (a) + f (a)(x a)

    In other words, near x = a the function f (x) is well-approximatedby the LINEAR function L(x) = f (a) + f (a)(x a) which is atangent line approximation.

    Denny Vitasari Taylor series

  • If f (x) is twice differentiable on an open interval I containing athen for any x in I :

    f (x) = f (a) + f (a)(x a) + 12f (c)(x a)2

    for some c between a and x .If x is close to a, then c is also close to a:

    f (x) f (a) + f (a)(x a) + 12f (a)(x a)2

    Denny Vitasari Taylor series

  • Linear approximation:

    f (x) f (a) + f (a)(x a)

    Quadratic approximation:

    f (x) f (a) + f (a)(x a) + 12f (a)(x a)2

    Denny Vitasari Taylor series

  • Taylor series expansion

    The Taylor expansion of f (x) around a:

    f (x) f (a)+f (a)(xa)+12f (2)(a)(xa)2+ 1

    2 3 f(3)(a)(xa)3+...

    Or in other format:

    f (x) k=0

    1k!f (k)(a)(x a)k

    Denny Vitasari Taylor series

  • Example: Taylor expansion of y = sin x around x = 0

    Denny Vitasari Taylor series

  • Maclaurin series

    Maclaurin series is a special case of Taylor series with the centre ofexpansion is a = 0.The Maclaurin expansion of f (x):

    f (x) f (0) + f (0)x + 12f (2)(0)x2 +

    12 3 f

    (3)(0)x3 + ...

    Or in other format:

    f (x) k=0

    1k!f (k)(0)xk

    Denny Vitasari Taylor series

  • Taylor and Maclaurin series: Facts

    The Taylor series is named after the English mathematicianBrook Taylor (16851731).The Maclaurin series is named for the Scottish mathematicianColin Maclaurin (16981746).Maclaurin series are named after Colin Maclaurin because hepopularized them in his calculus textbook Treatise of Fluxionspublished in 1742.

    Denny Vitasari Taylor series

  • Example:Maclaurin series for f (x) = sin xThe derivatives:

    f (x) = cos xf (x) = sin xf (3)(x) = cos xf (4)(x) = sin xf (5)(x) = cos x

    f (x) = 1f (x) = 0f (3)(x) = 1f (4)(x) = 0f (5)(x) = 1

    Therefore we obtain:

    sin x x x3

    3!+

    x5

    5! x

    7

    7!+ ...

    Denny Vitasari Taylor series

  • Denny Vitasari Taylor series

  • Exercise

    Find the Maclaurin series of:f (x) = cos xf (x) = ex

    f (x) = (1 x)1

    Denny Vitasari Taylor series

  • Remainder

    A Taylor series:

    f (x) k=0

    1k!f (k)(a)(x a)k

    Taylor polynomial of order n:

    Pn(x) n

    k=0

    1k!f (k)(a)(x a)k

    Remainder:

    Rn(x)

    k=n+1

    1k!f (k)(a)(x a)k

    Denny Vitasari Taylor series

  • When we use part of a Taylor series to estimate the value of afunction, the end of the series that we do not use is called theremainder. If we know the size of the remainder, then we know howclose our estimate is.

    Denny Vitasari Taylor series

  • An amazing use of infinite series

    ex = 1+ x +x2

    2!+

    x3

    3!+

    x4

    4!+ ...

    Substitute xi for x

    e ix = 1+ ix +(ix)2

    2!+

    (ix)3

    3!+

    (ix)4

    4!+

    (ix)5

    5!+

    (ix)6

    6!+ ...

    e ix = 1+ ix +i2x2

    2!+

    i3x3

    3!+

    i4x4

    4!+

    i5x5

    5!+

    i6x6

    6!+ ...

    e ix = 1+ ix x2

    2! ix

    3

    3!+

    x4

    4!+

    ix5

    5! x

    6

    6!+ ...

    e ix = 1 x2

    2!+

    x4

    4! x

    6

    6!+ ...+ i

    (x x

    3

    3!+

    x5

    5!+ ...

    )

    Denny Vitasari Taylor series

  • e ix = 1 x2

    2!+

    x4

    4! x

    6

    6!+ ...+ i

    (x x

    3

    3!+

    x5

    5!+ ...

    )e ix = cos x + i sin x

    let x = pie ipi = cospi + i sinpi

    e ipi = 1+ i 0e ipi + 1 = 0

    This is an amazing identity shows the interrelation of five mostfamous numbers in mathematics.

    Denny Vitasari Taylor series