Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Taylor Series Derivation

2 views
Skip to first unread message

Dephinus

unread,
May 5, 2006, 11:19:41 AM5/5/06
to
Given f(x) = ln(x+2), how would one derive (from scratch) the Taylor series based at x = -1 for f(x)?

Thanks!

Dave L. Renfro

unread,
May 5, 2006, 12:27:29 PM5/5/06
to
Dephinus wrote:

> Given f(x) = ln(x+2), how would one derive (from scratch)
> the Taylor series based at x = -1 for f(x)?

What does "from scratch" mean in this context?
My guess is you simply mean computing the appropriate
derivatives and plugging their values into the general
Taylor series expansion. Did you try finding the
derivatives? They're easy to find (no product or
quotient rules needed, and the derivatives don't
get successively more difficult with each new one)
and an obvious pattern will emerge.

Dave L. Renfro

Dephinus

unread,
May 5, 2006, 1:02:48 PM5/5/06
to
Indeed, the derivatives are easy to find: how would you make it into a Taylor's series?

f(x) = ln(x+2)
f'(x) = 1/(x+2)
f^2(x) = -1/(x+2)^2
f^3(x) = 2/(x+2)^3
f^4(x) = -6/(x+2)^4
f^5(x) = 24/(x+2)^5
f^6(x) = -120/(x+2)^6

Now, would it be something along the lines of

Summation (from 0 to n) of a_k, which a_k is the following:

A little confused on how to see the pattern; obviously the denominator's exponent is increasing by 1 each time; it appears to be an Alternating Series, and the number is being multiplied by 1, 2, 3, 4, ..., n (while alternating signs). Something along those lines. Would that just be the Taylor series?

Dave L. Renfro

unread,
May 5, 2006, 2:40:20 PM5/5/06
to
Dephinus wrote (in part):

> Indeed, the derivatives are easy to find: how would
> you make it into a Taylor's series?
>
> f(x) = ln(x+2)
> f'(x) = 1/(x+2)
> f^2(x) = -1/(x+2)^2
> f^3(x) = 2/(x+2)^3
> f^4(x) = -6/(x+2)^4
> f^5(x) = 24/(x+2)^5
> f^6(x) = -120/(x+2)^6

One thing that will help is to be on the lookout
for repeated multiplicative patterns that show up,
because you'll often be able to write compressed
closed-form versions of them using factorials.

This is something that an instructor should
have pointed out or something you'd eventually
pick up with enough experience.

In the above, let's write things in expanded form:

1 * (x+2)^(-1)

(1)(-1) * (x+2)^(-2)

(1)(-1)(-2) * (x+2)^(-3)

(1)(-1)(-2)(-3) * (x+2)^(-4)

(1)(-1)(-2)(-3)(-4) * (x+2)^(-5)

Note that the coefficients are factorials.
Specifically, the coefficient for the n'th
derivative is (+ or -)(n-1)!

So we can write the n'th derivative as

(+ or -)(n-1)! * (x+2)^(-n)

Now the signs alternate (because you get the
next coefficient by multiplying by a negative
number, and multiplying by a negative number
changes the sign), so this tells you that we
need a factor of (-1)^n or (-1)^(n+1), whichever
will match up correctly.

Again, this is something that an instructor should
have pointed out or something you'd eventually
pick up with enough experience.

For n = 1, 2, 3, ... the signs are +, -, +, ...
Thus, we need to use (-1)^(n+1) and not (-1)^n.

NOTE: You can also use (-1)^(n-1), or even things
like (-1)^(n+3), (-1)^(n-5), etc., but I think most
people would use either (-1)^(n+1) or (-1)^(n-1)
when the signs are +, -, +, ... for n = 1, 2, 3, ...

Incorporating the "alternating sign correction factor",
we get the n'th derivative to be

(-1)^(n+1) * (n-1)! * (x+2)^(-n).

Now what we really wanted was the n'th derivative
evaluated at x = -1, so we plug in x = -1 and get

(-1)^(n+1) * (n-1)! * (1)^(-n) = (-1)^(n+1) * (n-1)!

NOTE: If there was an easy direct route to the
n'th derivative evaluated at x = -1, we would
have used it, but the simplest method (most of
the time) is to use general differentiation rules
to find the derivative at any number x and then
specialize to x = -1.

Now you have to know the general Taylor series
expansion formula. See the top displayed formula
at this web page:

http://en.wikipedia.org/wiki/Taylor_series

In our case, a = -1, so we get

Sum from n=0 to infinity of [(A_n)/n!] * (x - -1)^n,

where A_n is the n'th derivative evaluated at x = -1.

(The 0'th derivative of a function is, by convention,
taken to be the function itself.)

>From above, we get A_n = (-1)^(n+1) * (n-1)! / n!

when n is not zero, which is equal to (-1)^(n+1) / n.

NOTE: Facility with simplifying quotients of factorials
is important here. If the above is mysterious to you,
practice with 3!/4!, 6!/7!, 8!/9!, etc. Simplify by
canceling common factors first, not by "multiplying
the factorials out" first.

Before getting too worked up about what happens when
n=0, note that the zero'th derivative evaluated at
x = -1 is f(-1) = ln(-1 + 2) = ln(1) = 0, so the
first term in the Taylor series is going to vanish.

Finally, since (x - -1)^n = (x+1)^n, we have the
result in simplified form:

Sum from n=1 to infinity of [(-1)^(n+1) / n] * (x+1)^n.

The sum starts at n=1 because the general expression
above isn't defined for n=0 and because the term for
n=0 is zero (i.e. doesn't appear).

--------------------------------------------------------

A neat way to get the same result is to use the fact
that a + ar + ar^2 + ... = a/(1-r) (geometric series).

We have f'(x) = 1/(x+2).

Let's rewrite this in a/(1-r) form. Also, since we
want the expansion in powers of x+1, we need r
to be x+1 (or a close relative, as we'll see).

1/(x+2) = 1 / [1 + (x+1)] = 1 / [1 - (-x-1)].

Thus, we have f'(x) = a/(1-r) with a=1 and r = -x-1.

Hence,

f'(x) = 1 + 1*(-x-1)^1 + 1*(-x-1)^2 + 1*(-x-1)^3 + ...

f'(x) = 1 - (x+1) + (x+1)^2 - (x+1)^3 + ...

NOTE: I'm using the fact that (-x-1)^n is equal to
[(-1)(x+1)]^n = (-1)^n * (x+1)^n = ...

Now integrate both sides to get

f(x) = constant + x - (1/2)*(x+1)^2 + (1/3)*(x+1)^3 - ...

We can find the integration constant by plugging x = -1
into both sides:

f(-1) = constant + (-1) - 0 + 0 - ...

ln(1) = constant - 1

0 = constant - 1

constant = 1

Therefore, we have

f(x) = 1 + x - (1/2)*(x+1)^2 + (1/3)*(x+1)^3 - ...

or

f(x) = (x+1) - (1/2)*(x+1)^2 + (1/3)*(x+1)^3 - ...

Comparing this with what we got before,

Sum from n=1 to infinity of [(-1)^(n+1) / n] * (x+1)^n,

you'll see they're the same thing. Neat, huh?

DISCLAIMER: There are a lot of steps in this "geometric
series method" that would have to be justified for this
to be completely rigorous. However, the reasons why these
steps need to be justified and how to do so are best worried
about after you're a little further in math (if in fact
you ever need to worry about them). But I will mention
that the geometric series will not converge if |r| > 1,
which in this case translates to |-x-1| > 1, or |x+1| > 1,
or (x < -2 OR x > 0). So x needs to be between -2 and 0
(endpoints have to be checked separately) for the series
to work.

Dave L. Renfro

Dave L. Renfro

unread,
May 5, 2006, 3:53:49 PM5/5/06
to
Dave L. Renfro wrote (in part):

> Now you have to know the general Taylor series
> expansion formula. See the top displayed formula
> at this web page:
>
> http://en.wikipedia.org/wiki/Taylor_series

Just now I was looking in Merriam-Webster's Collegiate
Dictionary (11'th edition) to see if "tax-free" is
hyphenated, and what do I see but an entry for
"Taylor series" that gives the general Taylor
series formula!

Dave L. Renfro

Milah

unread,
May 9, 2006, 1:37:55 AM5/9/06
to
Lol, thats cool :D.

0 new messages