# Do not understand L'Hopital Rule

I have just started learning L'Hopital rule, and so far I thought I understood everything until I stumbled upon this question $$\lim_{x\to 0} \frac{\ln(\cos(ax))}{\ln(\cos(bx))}.$$

To this, eventually got $$\lim_{x\to 0} \frac{a \sin(ax) \cos(bx)}{b \sin(bx)\cos(ax)}$$

From my knowledge, $$\sin(0)$$ is 0!! and the whole thing will be ''$$\frac{0}{0}$$'', however the answer key I was given does not continue the implementation of the L'Hopital rule, but instead obtains the answer $$\frac{a^2}{b^2}$$.

Is there some important concept I'm missing out? Or is the differentiation supposed to continue and the answer key just skipped the steps?

• Short answer: since $sin(ax), sin(bx) \xrightarrow{x \to 0} 0$, you have the apply L'Hospital's rule a second time. – Ramanujan Nov 17 '18 at 10:58
• Are you asking why your answer key does not use L'Hopital rule although the limit is of the form $0/0$, or are you getting stuck while applying the rule? – Teresa Lisbon Nov 17 '18 at 10:59
• Note that $\lim_{x\to 0}\frac{\sin(ax)}{x}=a$ – Robert Z Nov 17 '18 at 11:00
• @астонвіллаолофмэллбэрг the question does use the rule but the answer doesn’t tally up with what i know and i was just wondering if there are gaps in my knowledge, like the derivative i came up with is supposed to be 0/0 but the answer key shows a^2/b^2 – Meowmi Nov 17 '18 at 11:00
• @RaniceTan For getting a better idea of how you and the answer key differ, reproduce the answer from the answer key here, and then show your own working and why you are getting $0/0$ where the answer key is getting $a^2/b^2$. – Teresa Lisbon Nov 17 '18 at 11:03

You can apply l'Hôpital once more: $$\lim_{x\to 0}\frac{a}{b} \frac{a\cos(ax)\cos(bx)-b\sin(ax)\sin(bx)} {b\cos(bx)\cos(ax)-a\sin(bx)\sin(ax)}$$ and now direct substitution is possible. Not the best method, however: you can observe that $$\lim_{x\to0}\frac{\cos(bx)}{\cos(ax)}=1$$ and reduce to computing $$\lim_{x\to0}\frac{\sin(ax)}{\sin(bx)}$$ which is $$a/b$$.

With Taylor expansion, note that, assuming $$a\ne0$$, $$\cos(ax)=1-\frac{(ax)^2}{2!}+o(x^2)\qquad \ln(1+t)=t+o(t)$$ so that $$\ln(\cos(ax))=-\frac{a^2x^2}{2}+o(x^2)$$ Hence your limit is $$\lim_{x\to0}\frac{-a^2x^2/2+o(x^2)}{-b^2x^2/2+o(x^2)}=\frac{a^2}{b^2}$$

$$\lim_{x\to}\dfrac{\sin ax}{\sin bx}\cdot\dfrac{\cos bx}{\cos ax}$$

$$=\dfrac ab\lim_{x\to0}\dfrac{\sin ax}{ax}\cdot\lim_{x\to0}\dfrac{bx}{\sin bx}\lim_{x\to0}\dfrac{\cos bx}{\cos ax}=?$$

Mind you $$\lim_{x\to0}\implies x\ne0$$

Using $$\cos^2y=1-\sin^2y,$$

$$2\lim_{x\to0}\dfrac{\ln(\cos ax)}{x^2}=-a^2\lim_{x\to0}\dfrac{\ln(1-\sin^2ax)}{-\sin^2ax}\left(\lim_{x\to0}\dfrac{\sin(ax)}{ax}\right)^2=-a^2$$

From here by standard limits

$$\ldots=\lim_{x\to 0} \frac{a \sin(ax) \cos(bx)}{b \sin(bx)\cos(ax)}=\lim_{x\to 0} \frac a b\frac{\tan (ax)}{\tan (bx)}=\lim_{x\to 0} \frac {a^2} {b^2}\frac{\tan (ax)}{ax}\frac{bx}{\tan (bx)}=\frac {a^2} {b^2}\cdot 1 \cdot 1 =\frac {a^2} {b^2}$$