2

I am trying to prove to myself why can substitution be used while using taylor expansion. for example: the taylor expansion of $e^{(x-3)^2}$ around $a=3$ and order of $6$ can be done by first evaluating $e^x$ and than plugging in $(x-3)^2$ getting $P_{6}(x)=1+(x-3)^2+\frac{(x-3)^4}{4}+\frac{(x-3)^6}{6}$

We know that $f(x)=P_{n}(x)+R_{n}(x)$ when $lim_{x\to a} \frac{R_n{x}}{(x-a)^n}=0$

So we first use taylor expansion around $a=0$ and of order $k=3$

So we in general we have $f(x)=P_{k}(x)+R_{k}(x)$ now we plug in $(x-3)^2$ and get $f(x)=P_{k*m}(x)+R_{k*m}(x)$ where $m=2$

Because we overall got a polynomial in the form of $f(x)=P_{n}(x)+R_{n}(x)$ the used substitution can be made? is that a valid proof?

gbox
  • 12,867

2 Answers2

2

This problem is related to series composition and what you did is almost perfectly correct.

Make a change of variable $(x-3)^2=y$ and use the fact that, around $y=0$ $$e^y=1+y+\frac{y^2}{2}+\frac{y^3}{6}+O\left(y^4\right)\tag 1$$ Now, you just need to replace $y$ by $(x-3)^2$ to get $$e^{(x-3)^2}=1+(x-3)^2+\frac{1}{2} (x-3)^4+\frac{1}{6} (x-3)^6++O\left((x-3)^{8}\right)$$

Take care : there is a typo in your formula ($\frac 14$ should be $\frac 12$).

The problem would have been different say for $e^{\sin(x)}$. You could start using $(1)$ and write $$e^{\sin(x)}=1+\sin(x)+\frac{\sin^2(x)}{2}+\frac{\sin^3(x)}{6}+O\left(\sin^4(x)\right)$$ and use $$\sin(x)=x-\frac{x^3}{6}+O\left(x^5\right)\tag 2$$ Replacing you would get $$e^{\sin(x)}=1+x+\frac{x^2}{2}-\frac{x^4}{8}+O\left(x^5\right)$$ The other way, would have been to write $$e^{\sin(x)}=e^{x-\frac{x^3}{6}+O\left(x^5\right)}$$ and use $y=x-\frac{x^3}{6}+O\left(x^5\right)$ in $(1)$. For sure, the result would be the same.

2

The Taylor expansion is valid for any value of the argument; whether you write it $x$ or $(x-3)^2$ doesn't make a difference. (It also works with $\cos\theta$, but then you don't obtain a polynomial expression.)


The interesting fact that the expansions done with and without the substitution coincide is explained by the chain rule.

Let $g(x)=f(p(x))$. To the first order, the development of $g$ around $0$

$$g(x)=g(0)+g'(0)x+\cdots,$$ can be compared to the development of $f$ around $p_0:=p(0)$

$$f(p(x))=f(p_0)+f'(p_0)(p(x)-p_0)+\cdots.$$

But obviously,

$$p(x)=p(0)+p'(0)x+\cdots$$ and the previous expression is

$$f(p(x))=f(p_0)+f'(p_0)p'(0)x+\cdots.$$

We do match

$$g'(0)=f'(p(0))p'(0).$$

Similar relations hold for the higher order terms.


For the second order,

$$g(x)=g(0)+g'(0)x+g''(0)\frac{x^2}2+\cdots$$

$$f(p(x))=f(p_0)+f'(p_0)(p(x)-p_0)+\frac12f''(p_0)(p(x)-p_0)^2+\cdots$$

$$p(x)=p(0)+p'(0)x+\frac12p''(0)x^2+\cdots$$

giving

$$f(p(x))=f(p_0)+f'(p_0)(p'(0)x+\frac12p''(0)x^2+\cdots)+\frac12f''(p_0)(p'(0)x+\frac12p''(0)x^2+\cdots)^2+\cdots$$

and the coefficients of $x^2$ say

$$g''(0)=f'(p(0))p''(0)+f''(p(0))p'^2(0).$$

This matches the second order chain rule.

  • the term for $g''(0)$ is $f''(p(0))p'(0)+f'(p(0))p''(0)$??? if this is true, the expression is very complicated –  Jul 11 '16 at 09:12
  • @juliogodoy: $g''(0)=f''(p(0))p'^2(0)+f'(p(0)p''(0)$, a little more complicated :) –  Jul 11 '16 at 09:37
  • sorry you right –  Jul 11 '16 at 09:45
  • @juliogodoy: the next terms become terrible. –  Jul 11 '16 at 09:48
  • Lol hahahhahahha –  Jul 11 '16 at 09:51
  • @YvesDaoust Do you know of a nice proof of this? – GambitSquared Nov 13 '16 at 18:42
  • @YvesDaoust I think this is a very useful answer, maybe also to this question math.stackexchange.com/questions/2010255/… Could you perhaps elaborate this reasoning with an example? – GambitSquared Nov 13 '16 at 18:42
  • @YvesDaoust I actually tried to recalculate your example of the second order, but then I also end up with $x^3$ and $x^4$ and their coefficients... with all due respect: are you sure a substitution is always valid? Probably I made a mistake... – GambitSquared Nov 14 '16 at 16:54
  • 1
    @ImreVégh: what's the problem having $x^3$ and $x^4$ terms ? They are irrelevant. –  Nov 14 '16 at 17:21
  • @YvesDaoust Ah, I see, you are right I guess. But what does all this have to do with substitution? Let's take $g(x)=f(p(x))=e^{2x+1}$ as an example. Here the first order of $g(x)$ around $x=0$ is $g(x)=e+e2x$, and indeed also $f(x)=f(p(0))+f'(p(0))p'(0)x=e+e2x$. But with substitution we would expand $e^u$ with $u=2x+1$ which gives us $g(x)=1+(2x+1)$ which clearly is not equal to $g(x)=e+e2x$. Although if we expand infinitely the same function arises. What is happening here? – GambitSquared Nov 14 '16 at 18:03
  • @ImreVégh: you are developing around $u=0$, but with $x=0,u=1$. –  Nov 14 '16 at 18:11