# Math Help - 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 $cos \pi x$ you get $-\pi sin \pi x$. Differentiating $-\pi sin \pi x$ gives $-\pi^2 cos \pi x$.

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

3. Hello, charleschafsky!

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

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

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

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

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

Therefore: . $\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}$