Value that makes the piecewise function continuous Question: Given the function $f:(0, \infty) \to \mathbb R$ defined by
$$f(x) = \left\{
        \begin{array}{ll}
            \int^{x^2}_x \frac{dt}{ln(t)} & \quad x \neq 1 \\
            l                             & \quad x = 1
        \end{array}
    \right.
$$
determine the value of $l$ that makes $f$ continuous at $1$. For this value of $l$, is the function also differentiable at $1$?
I wanted to evaluate the limit of $f(x)$ when $x$ approaches to $1^+$ and $1^-$. But I think $\frac{1}{ln(x)}$ does not have a nice indefinite integral, so I couldn't evaluate the limit. Any suggestions?
 A: Note that $\ln(x)\approx x-1$ for $x$ close to $1$. Then:
$$\lim_{x\to 1^{-}}\int_{x}^{x^{2}}\frac{dt}{t-1}=\lim_{x\to 1^{-}}\ln\vert t-1\vert\bigg\vert_{x}^{x^{2}}=\lim_{x\to 1^{-}}\ln\vert x^{2} - 1\vert -\ln\vert x - 1\vert=\lim_{x\to 1^{-}}\ln\bigg\vert\frac{x^{2}-1}{x-1}\bigg\vert$$
$$=\lim_{x\to 1^{-}}\ln\vert x + 1\vert = \ln\vert 1 + 1\vert = \ln2$$
And similarly for the limit from the positive side. Thus, $\boxed{l = \ln 2.}$
Now, we will analyze differentiability at $x=1$. Since we will be taking one-sided limits as approaching $1$, we will only need to worry about the integral piece of the function. Letting $F(x)$ be a function such that $\frac{d}{dx}F(x) = \frac{1}{\ln x}$:
$$\frac{d}{dx}\int_{x}^{x^{2}}\frac{dt}{\ln t}=\frac{d}{dx}\big(F(x^{2}) - F(x)\big)$$
By the Chain Rule:
$$=\frac{2x}{\ln x^{2}} - \frac{1}{\ln x}$$
Log properties:
$$=\frac{2x}{2\ln x}-\frac{1}{\ln x}=\frac{x - 1}{\ln(x)}$$
Now we need to find the one-sided limits of the derivative approaching $1$. We have:
$$\lim_{x\to 1^{-}}\frac{x-1}{\ln(x)}$$
Using l'Hopital:
$$\lim_{x\to 1^{-}}\frac{1}{\frac{1}{x}}=\lim_{x\to 1^{-1}}x = 1$$
Once again, we obtain the same answer for the other one-sided limit. And since we have already "patched" the function to ensure continuity, the equality and existence of these two limits is enough for us to say that $\boxed{\text{The function is differentiable at }x = 1.}$
