Why can’t I use Taylor Series shortcut here

asymptoticsreal-analysistaylor expansion

I am asked to find the taylor series of $g(x)=x^{2}\ln(x)$ about $a=1$.

My Steps:
Let $x=1+y$, so $\ln(x)=\ln(1+y)=y-\frac{y^2}{2}+\frac{y^3}{3}+\mathcal{O}(y^4)$(*), for $y\to0$

Now subbing into the equation we get, (*)$=(x-1)-\frac{(x-1)^2}{2}+\frac{(x-1)^3}{3}+\mathcal{O}((x-1)^4)$.

And then finally taking $x^2$ into account, the taylor series of $x^2$ around $a=1$ is still $x^2$, so therefore we can simply multiply the two series:

Therefore:

$x^2ln(x)=x^2(x-1)-\frac{x^2(x-1)^2}{2}+\frac{x^2(x-1)^3}{3}+\mathcal{O}((x-1)^6)$

However using the taylor series calculator:

$x^2ln(x)=(x-1)-\frac{3(x-1)^2}{2}+\frac{(x-1)^3}{3}+\mathcal{O}((x-1)^4)$

Question:

What is wrong with my shortcut method?
Is there a rule of thumb for when NOT to use shortcuts, and simply calculate the series through the derivatives?

Best Answer

Strictly speaking, the Taylor series of $x^2$ around $a=1$ is : $$x^2=\left(1+(x-1)\right)^2=1+2(x-1)+(x-1)^2+\mathcal{O}\left((x-1)^3\right)$$ Of course, the coefficients of the $(x-1)$ terms of power $>2$ are nul. So, the Taylor series is : $$x^2=1+2(x-1)+(x-1)^2$$ You are allowed to multiply two Taylor series around the same point, thus $$x^2\ln(x)=\left(1+2(x-1)+(x-1)^2\right)\left((x-1)-\frac{(x-1)^2}{2}+\frac{(x-1)^3}{3}+\mathcal{O}((x-1)^4)\right)$$ and after simplification $$x^2\ln(x)=(x-1)-\frac{3(x-1)^2}{2}+\frac{(x-1)^3}{3}+\mathcal{O}((x-1)^4)$$ If you don't proceed like that, you got terms such as $x^2(x-1)^n$ which are not of the form $\mathcal{O}\left((x-1)^n\right)$. So, you don't have a Taylor series on correct form.

Note :

Your result $\quad x^2\ln(x)=x^2(x-1)-\frac{x^2(x-1)^2}{2}+\frac{x^2(x-1)^3}{3}+\mathcal{O}((x-1)^6)\quad$ is correct, but this is another kind of series than Taylor series.

If you think of approximate around $x=1$, one can compare $$x^2\ln(x)\simeq (x-1)-\frac{3(x-1)^2}{2}+\frac{(x-1)^3}{3}\tag 1$$ $$x^2\ln(x)\simeq x^2(x-1)-\frac{x^2(x-1)^2}{2}+\frac{x^2(x-1)^3}{3}\tag 2$$ Graphical comparison to $x^2\ln(x)$ shows that the deviations for $(2)$ are lower than for $(1)$ on a large range around $x=1$. This is an example of approximation with limited Taylor series is worse than with another kind of series. This is not an unusual case.

Related Question