Artificial intelligent assistant

Generalization of L'Hospital's rule If $f$ and $g$ are differentiable functions at $(a,b)$ where $-\infty\leqslant a<b\leqslant +\infty$. Also $f(x),g(x)\to 0$ as $x\to a$ or $f(x),g(x)\to \pm \infty$ as $x\to a$ and exists $\lim \limits_{x\to a}\dfrac{f'(x)}{g'(x)}$. Then $$\lim \limits_{x\to a}\dfrac{f(x)}{g(x)}=\lim \limits_{x\to a}\dfrac{f'(x)}{g'(x)}.$$ It's from baby Rudin (theorem 5.13). Let's take a look at these examples $\lim \limits_{x\to 0}\dfrac{x-\sin x}{x^3}$ and $\lim \limits_{x\to +\infty}\dfrac{x^k}{e^x}$ and after taking first derivatives we get expressions which is also is indeterminacy $\frac{0}{0}$ and $\frac{\infty}{\infty}$. I think that in this case L'Hospital's rule must be modified. Can anyone write how this modification looks?

If $$\displaystyle\lim_{x\to a}\frac{f^{(k)}}{g^{(k)}}$$ exists and $f^{(k-1})$, $g^{(k-1)}\to 0$ or $\pm\infty$, then the theorem guarantees that $$\displaystyle\lim_{x\to a}\frac{f^{(k-1)}}{g^{(k-1)}}$$ exists and is equal. Then, if $f^{(k-2})$, $g^{(k-2)}\to 0$ or $\pm\infty$, $$\displaystyle\lim_{x\to a}\frac{f^{(k-2)}}{g^{(k-2)}}$$ exists and is equal. Etc.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 004326109b4e0694f06906b07cab863c