$f:\mathbb{R}\to \mathbb{R} $where$$f(x) = \begin{cases} \dfrac{P(x)}{x^n}e^{-1/x^2}& \text{if $x\ne 0$}, \\ 0 &\text{if $x = 0$}.\end{cases}$$
Where P(x) is a polynomial and $n\geq 0$ is an integer.
Prove that $f$ is differentiable everywhere and takes the form $$f'(x) = \begin{cases} \dfrac{Q(x)}{x^m}e^{-1/x^2}& \text{if $x\ne 0$}, \\ 0 &\text{if $x = 0$}.\end{cases}$$ where $m\geq 0$ is some integer
I have a note here from the question that I should consider cases with x = 0 and $x\not=0$ separately. I have a few thoughts about the question, we discussed it briefly with a tutor of mine (not the lecturer) and he suggested to just use the fact that all polynomials are differentiable, as is $e^{-1/x^2}$ and $x^n$ but that doesn't really consider both cases of x = 0 and $x\not=0$ so I thought I'd try it another way:
if $ x = 0$: by definition $f'(0) = \lim_{h\to0} \dfrac{P(h)e^{-1/h^2}}{h} $ should exist $= \lim_{h\to0} \dfrac{a_0 + a_1h + a_2h^2 + ... a_kh^k}{h^n}e^{-1/h^2} = \lim_{h\to0} \left( \frac{a_0}{h^n} + \frac{a_1}{h^{n-1}} + ... \right) e^{-1/h^2} $ but I don't know how to evaluate $\lim_{h\to0}e^{-1/h^2}$ also, would $\lim_{h\to0} \left( \frac{a_0}{h^n} + \frac{a_1}{h^{n-1}} + ... \right) e^{-1/h^2} = \left (a_1 + a_2 + a_3 + ... + a_k \right) \lim_{h\to0} e^{-1/h^2} $? If so, how would I get it in the form of $\dfrac{Q(x)}{x^m}e^{-1/x^2}$ ? I think I can use my tutors method when $x\not= 0$
any help, thank you