$\def\cosec{\operatorname{csc}}$ Calculate the value of the improper integral
$\int^{\pi/2}_0\left (\cosec x - \dfrac{1}{x}\right)\,\mathrm dx.$
You may use the standard integral $\int \cosec x \,\mathrm dx = -\ln|\cosec x + \cot x| + c $.
Please note this is a 3 point question. Here is my solution:
This definite integral is improper at $x=0$, so we have: \begin{align*} \lim_{b\to0}\int^{\pi/2}_b\cosec x - \dfrac{1}{x}\,\mathrm dx &= -\ln|\cosec x + \cot x|- \ln|x| \biggr|^{\pi/2}_b\\ &= \lim_{b\to0} -\left(\ln\left|\cosec \frac{\pi}{2} + \cot \frac{\pi}{2}\right|- \ln\left|\frac{\pi}{2}\right| \right) - (-\ln|\cosec b + \cot b|- \ln|b| ) \end{align*}
For $\lim\limits_{b\to0}-(\ln|\cosec b + \cot b|+ \ln|b|)$, using the properties of logarithms, I have $-\lim\limits_{b\to0} \ln|b\cosec b + b\cot b|$.
The limits are both solved similarly by L'Hôpital's rule, giving:
$-\lim_{b\to0}\ln|b\cosec b + b\cot b| = -\lim_{b\to0}\ln|1 + 1| = -\ln|2|$
Therefore, I have:
$\lim_{b\to0} \left(-\ln|1+0|- \ln\left|\frac{\pi}{2}\right| \right) - (-\ln|2| ) = \ln\left|\frac{2}{\pi/2}\right| = \ln\left|\dfrac{4}{\pi}\right|$
Is this correct and answered sufficiently? Have I made any errors?
Thanks so much!