Calculus >

Taylor polynomials can be used to approximate a function around any value for a differentiable function. Taylor polynomials look a little ugly, but if you break them down into small steps, it’s actually a fast way to approximate a function.

**Sample problem**: Use Taylor polynomials to approximate the function cos(x) around the point x=2.Step 1:

**Evaluate the function for the first part of the Taylor polynomial:**

p(x) =

^{f(c)}⁄

_{ o!}= cos(2)

Step 2: **Evaluate the function for the second part of the Taylor polynomial** (adding it to the first part from Step 1):

p(x) = cos(2) + ^{f'(c)} ⁄_{ 1!}(x-c) = cos(2) – sin(2)(x-2)

Step 3: **Evaluate the function for the third part of the Taylor polynomial** (adding it to the first and second parts from Step 2):

p(x) = cos(2) – sin(2)(x-2) + ^{f”(c)}⁄_{2!}(x-c)^{2} = cos(2) – sin(2)(x-2) – ^{cos(2)} ⁄_{ 2}(x-2)^{2}

Step 4: **Evaluate the function for the fourth part of the Taylor polynomial** (adding it to the first, second and third parts from Step 3):

p(x) = cos(2) – sin(2)(x-2) + ^{f”'(c)}⁄_{3!}(x-c)^{3} = cos(2) – sin(2)(x-2) – ^{cos(2)} ⁄_{ 2}(x-2)^{2} – ^{sin(2)}⁄_{6} (x-2)^{3}

Step 5: **Continue evaluating more pieces of the Taylor polynomial**, graphing the function periodically to see how well it represents your polynomial.

**Tip:**Technically, you could go on forever with iterations of the Taylor polynomial, but usually five or six iterations is sufficient for a good approximation

If you prefer an online interactive environment to learn R and statistics, this *free R Tutorial by Datacamp* is a great way to get started. If you're are somewhat comfortable with R and are interested in going deeper into Statistics, try *this Statistics with R track*.

*Facebook page*and I'll do my best to help!