# How to solve a limit using L'Hôpital's rule

This is my limit:

$$\lim_{x \to 1} \left[(1-x)\tan\left(\frac{\pi x}{2}\right)\right]$$

My mind is probably playing games on me right now but can you help me?

-
$(1-x)tan\frac{\pi x}{2}=\frac{tan\frac{\pi x}{2}}{\frac{1}{1-x}}$ which is infinity over infinity case. You can apply L'hospital rule from there. – user45765 Aug 16 '14 at 13:50

You can write the limit as $$\lim_{x\to 1}\frac{\tan{\pi x/2}}{1/(1-x)}$$ Which is $\frac{\infty}{\infty}$, so you can apply L'Hopital's from there.

EDIT: Technically $$\lim_{x\to 1}\frac{1}{1-x} = \text{DNE}$$ So we have to check the limit as $x$ approaches $1$ from both sides, in which case $$\lim_{x\to 1^+}\frac{1}{1-x} = -\infty$$ $$\lim_{x\to 1^-}\frac{1}{1-x} = \infty$$ Which still results in an $\frac{\infty}{\infty}$ case.

-
Yeah that's it thanks. I've been studying calculus for a bit and I can't solve this simple problem because of fatigue. Appreciate it. – user3601507 Aug 16 '14 at 13:54
You're welcome, I have those days as well :) – Vishwa Iyer Aug 16 '14 at 13:55

We can make the answer more easy like this:

$$\lim_{x\to1}(1-x)\tan\frac{\pi x}{2}=\lim_{x\to1}\frac{(1-x)\sin\frac{\pi x}{2}}{\cos \frac{\pi x}{2}}=\lim_{x\to1}\frac{(1-x)}{\cos \frac{\pi x}{2}}=\lim_{x\to1}\frac{-1}{-\frac\pi2\sin\frac{\pi x}{2}}=\frac2\pi$$

-

$\lim \limits_{x \to 1} (1-x)\tan\frac{\pi x}{2} = \lim \limits_{x \to 1} \dfrac{1-x}{\cot\frac{\pi x}{2}} ~\stackrel{L'hop}{=}~ \lim \limits_{x \to 1} \dfrac{-1}{-\csc^2\frac{\pi x}{2}\times \dfrac{\pi}{2}} = \dfrac{2}{\pi}$

-

$$\lim_{x \to 1} (1-x) \tan \frac{\pi x}{2}=\lim_{x \to 1} (1-x) \frac{\sin \frac{\pi x}{2}}{ \cos \frac{\pi x}{2}}=\lim_{x \to 1} \frac{1-x}{\cos \frac{\pi x}{2}} \cdot \lim_{x \to 1}\sin \frac{\pi x}{2}=\lim_{x \to 1} \frac{1-x}{\cos \frac{\pi x}{2}} \cdot 1\overset{DLH}{=} \lim_{x \to 1} \frac{-1}{\left (-\frac{\pi}{2} \sin \frac{\pi x}{2} \right )}=\frac{2}{\pi}$$

-
You forgot that $-1$ from the beginning :) – Vishwa Iyer Aug 16 '14 at 13:57
@VishwaIyer I edited my post :) – evinda Aug 16 '14 at 13:59

Setting $1-x=h\iff x=1-h$

$$\lim_{x\to1}(1-x)\tan\frac{\pi x}2=\lim_{h\to0}h\tan\left(\frac\pi2-\frac{\pi h}2\right)$$

$$=\lim_{h\to0}h\cot\dfrac{\pi h}2$$

$$=\lim_{h\to0}\cos\frac{\pi h}2\cdot\dfrac1{\lim_{h\to0}\dfrac{\sin\dfrac{\pi h}2}{\dfrac{\pi h}2}}\cdot\dfrac2\pi$$

$$=\cos0\cdot\frac11\cdot\frac2\pi$$

-