# Taylor expansion of e^(2-x)

1. Oct 28, 2013

### zzmanzz

1. The problem statement, all variables and given/known data

Find $$e^{2-x}$$

using taylor/mclaurin expansion

2. Relevant equations

$$e^1 = \sum_{n=0}^\inf \frac{1}{n!}$$

$$e^x = \sum_{n=0}^\inf \frac{x^n}{n!}$$

3. The attempt at a solution

Can I just do:

$$e^{1+1-x}$$

$$[\sum_{n=0}^\inf \frac{1}{n!}*\sum_{n=0}^\inf \frac{1}{n!} * \sum_{n=0}^\inf \frac {(\frac{-x}{2})^n}{n!}]$$

2. Oct 28, 2013

### vela

Staff Emeritus
I'm not sure why you'd want to. About which point are you supposed to expand the function? If it's about x=0, try using the fact that $e^{2-x}=e^2e^{-x}$.

3. Oct 28, 2013

### zzmanzz

I'm not sure about which point to expand. I think that a = 0 is a requirement.

Ok so:

$$e^2*e^{-x} =$$

$$f(x) = C*e^{-x}$$

$$C = e^2 = \sum_{n=0}^\inf \frac{2}{n!}$$

$$e^{-x} = \sum_{n=0}^\inf \frac{(-x)^n}{n!}]$$

$$\sum_{i=0}^\inf \frac{2}{i!} * \sum_{j=0}^\inf \frac {(-x)^j}{j!}]$$

$$\sum_{i=0}^\inf \sum_{j=0}^\inf [ \frac{2}{i!} ]* [ \frac {(-x)^j}{j!}]$$

4. Oct 28, 2013

### vela

Staff Emeritus
Looks good.

Remember that $e^2$ is just a constant. It doesn't need to be expressed in series form, so you have
$$e^{2-x} = e^2\sum_{n=0}^\infty \frac{(-x)^n}{n!}.$$ Typically you pull the negative sign out and write $(-x)^n = (-1)^n x^n$.

5. Oct 28, 2013

### zzmanzz

ah. yes, I totally forgot so much fundamental calculus stuff it's embarrassing.

Please bare me with me for one more question.

In order to take

$$\frac{de^{2-x}}{dx}$$

It's

$$h'(x)*e^{h(x)}$$

$$h(x) = 2-x$$

$$h'(x) = -1$$

$$f'(x) = -1*e^{2-x}$$

$$f''(x) = 1*e^{2-x}$$

$$f'''(x) = -1*e^{2-x}$$

can I now do
$$f(x) = f(0) + f'(0)x + f''(0)\frac{x^2}{2!} + f'''(0)\frac{x^3}{3!} + ...+ f^n(0)\frac{x^n}{n!}$$

$$f(x) = e^2 - e^2 (-x) + e^2\frac{(-x)^2}{2!} - e^2 \frac{(-x)^3}{3!} + ...$$

$$f(x) = e^2 [ 1 - (-x) + \frac{(-x)^2}{2!} - \frac{(-x)^3}{3!} + ...]$$

so that equals the above sum it seems. Much clearer with the constant that you took out. The only thing I don't get is where the factorial n! comes from in the expansion? Sorry I didn't factor out the negative.. just wnated to post quick. I will do it from now on ! I think I might've screwed up in taking the derivatives.

Last edited: Oct 28, 2013
6. Oct 28, 2013

### vela

Staff Emeritus
The series should be in powers of x, not powers of -x, when you substitute in for the derivatives evaluated at 0, but otherwise your work is fine.

To see where the factorial comes from, look up the derivation of the Taylor series in your textbook.

7. Oct 28, 2013

### zzmanzz

Usually when I expand using the taylor/maclaurin series correctly the factorial is present inside the derivatives (i.e. I can factor it out or pinpoint it in the formula)

Like when I expanded ln(1+x) for example, the factorial came from the derivative n times
f'(x) = 1/(1+x) ,
f''(x) = -2*(1+x)^(-2)
f'''(x) = 2*3*(1+x)^(-3) .. etc. ?

In this one, I can't.

I will take your word for it and review it.

8. Oct 28, 2013

### vela

Staff Emeritus
The log series, $\ln (1+x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots$, actually doesn't end up with a factorial in it. The denominator is simply n.

For $\ln (1+x)$, the nth derivative evaluated at x=0 is, as you noted, $f^{(n)}(0) = (-1)^{n+1}(n-1)!$. When you plug this into the formula for the Taylor series, the coefficient of xn simplifies to
$$\frac{f^{(n)}(0)}{n!} = \frac{(-1)^{n+1}(n-1)!}{n!} = \frac{(-1)^n}{n},$$ as expected. So the derivatives generate a factorial, but there's also the factorial already present in the Taylor series formula.