# Thread: Having trouble taking this seemingly simple limit..

1. ## Having trouble taking this seemingly simple limit..

I'm having trouble taking this limit which should definitely be really simple. It looks as follows:

limit as x goes to 1 of (1 - x + lnx)/(1 + cos pi x)

This should probably use l'hopital's rule, since it goes to 0/0 so I take the derivative and get (-1 + 1/x)/(-sin pi x) which equals (-1 + x^-1)/(-sin pi x). This is 0/0 again, so I take l'hopital's rule again. I get (x^-2)/cos pi x. This is -1 as x approaches 1. However, I know this is wrong.

Where have I gone wrong?

Also, how are math equations done on this forum properly? Does it use TeX?

2. Originally Posted by charleschafsky
I'm having trouble taking this limit which should definitely be really simple. It looks as follows:

limit as x goes to 1 of (1 - x + lnx)/(1 + cos pi x)

This should probably use l'hopital's rule, since it goes to 0/0 so I take the derivative and get (-1 + 1/x)/(-sin pi x) which equals (-1 + x^-1)/(-sin pi x). This is 0/0 again, so I take l'hopital's rule again. I get (x^-2)/cos pi x. This is -1 as x approaches 1. However, I know this is wrong.

Where have I gone wrong?

Also, how are math equations done on this forum properly? Does it use TeX?
When you differentiate $\displaystyle cos \pi x$ you get $\displaystyle -\pi sin \pi x$. Differentiating $\displaystyle -\pi sin \pi x$ gives $\displaystyle -\pi^2 cos \pi x$.

This forum uses latex for typing math formulas. Quote my post to learn to use it.

3. Hello, charleschafsky!

$\displaystyle \lim_{x\to1}\frac{1 - x + \ln x}{1 + \cos\pi x}$

This should use L'hopital's rule, since it goes to $\displaystyle \tfrac{0}{0}$.

So I take the derivative and get: .$\displaystyle \frac{-1 + \frac{1}{x}} {-{\color{red}\pi}\sin \pi x}$ . . . . Chain rule!
which equals: .$\displaystyle \frac{-1 + x^{-1}}{-\pi\sin\pi x}$

This is $\displaystyle \tfrac{0}{0}$ again, so I use L'hopital's rule again.

I get: .$\displaystyle \frac{x^{-2}}{{\color{red}\pi^2}\cos\pi x}$

Therefore: .$\displaystyle \lim_{x\to1}\frac{\frac{1}{x^2}}{\pi^2\cos\pi x} \;=\;\frac{\frac{1}{1^2}}{\pi^2\cos\pi} \;=\;\frac{1}{\pi^2(-1)} \;=\;-\frac{1}{\pi^2}$