Let $f(x)=e^{-2x}(\cos x+2\sin x)$ and $g(x) = e^{-x}(\cos x+ \sin x).$ Find all the errors (if any) in the following L'Hôpital's rule argument:
$\lim\limits_{x\to \infty}\dfrac{f(x)}{g(x)}=\lim\limits_{x\to \infty}\dfrac{f'(x)}{g'(x)}=\lim\limits_{x\to \infty} \dfrac{5}{2}e^{-x}=0.$
Here's my work.
Recall the requirements for L'Hôpital's Rule:
To argue that $\lim\limits_{x\to c}\dfrac{f(x)}{g(x)}=\lim\limits_{x\to c}\dfrac{f'(x)}{g'(x)},$ the following must be true:
$1.$ $f(x)$ and $g(x)$ are differentiable on an open interval $I,$ but not necessarily at some point $c.$
$2.$ $\lim\limits_{x\to c}f(x)=\lim\limits_{x\to c}g(x)=0$ or $\pm \infty.$
$3.$ $g'(x)\neq 0\;\forall x\in I, x\neq c.$
$4.$ $\lim\limits_{x\to c}\dfrac{f'(x)}{g'(x)}$ exists.
We show that $f(x)$ and $g(x)$ are differentiable on $(-\infty, \infty).$ We have that $f'(x) = e^{-2x}(-2(\cos x+2\sin x) +(-\sin x+2\cos x))=-5e^{-2x}\sin x\;\forall x\in \mathbb{R}.$ Also, $g'(x)=e^{-x}(-(\cos x+\sin x)+(-\sin x+\cos x))= -2e^{-x}\sin x\;\forall x\in\mathbb{R}.$ Note that when $g(x)=0,\dfrac{f(x)}{g(x)}$ is undefined. This occurs when $\cos x + \sin x = 0\Rightarrow \tan x = -1\Rightarrow x = \dfrac{3\pi}{4}+2n\pi,n\in\mathbb{Z}.$ Let $x_0$ be such that $\tan x_0 = -1.$ We thus have that $f(x_0)=e^{-2x_0}(-\dfrac{\sqrt{2}}{2}+\sqrt{2})$ and $g(x_0)=0.$ Hence $\dfrac{f(x_0)}{g(x_0)}$ is indeterminate. Also, consider when $x_1= \tan^{-1} \left(-\dfrac{1}{2}\right)+2n\pi.$ Then $\dfrac{f(x_1)}{g(x_1)}=\dfrac{e^{-2x_1}\left(\cos \left(\tan^{-1}\left(\dfrac{1}{2}\right)\right)-2\sin \left(\tan^{-1}\left(\dfrac{1}{2}\right)\right)\right)}{e^{-x_1}[\cos (\tan^{-1} (\frac{1}{2}))-\sin (\tan^{-1}(\frac{1}{2}))]}\\ =e^{-x_1}\dfrac{\frac{2}{\sqrt{5}}-\frac{2}{\sqrt{5}}}{\frac{2}{\sqrt{5}}-\frac{1}{\sqrt{5}}}=0.$
Hence $\dfrac{f(x)}{g(x)}$ is not indeterminate for all $x\in\mathbb{N}$ such that $x=\tan^{-1} (-\dfrac{1}{2})+2n\pi.$
Now consider $g'(x)=-2e^{-x}\sin x.$ $g'(x)=0$ whenever $\sin x=0$ as $e^{-x}\neq 0\;\forall x\in \mathbb{R}.$ Thus, $g'(x)=0\Leftrightarrow x=n\pi,n\in\mathbb{N}.$ So this is another error.
From above, we have that $\lim\limits_{x\to \infty}\dfrac{f'(x)}{g'(x)}$ does not exist since it is undefined whenever $x=n\pi,n\in\mathbb{N}$ and equal to $\lim\limits_{x\to \infty}\dfrac{-5e^{-2x}\sin x}{-2e^{-x}\sin x}=\lim\limits_{x\to \infty}\dfrac{5}{2}e^{-x}=0$ whenever $x\neq n\pi.$