<s>[INST] A limit problem related to $\log \sec x$ 
If $$f(x) = \dfrac{{\displaystyle 3\int_{0}^{x}(1 + \sec t)\log\sec t\,dt}}{(\log\sec x)\{x + \log(\sec x + \tan x)\}}$$ then prove that $$\lim_{x \to {\pi/2}^{-}}f(x) = \frac{3}{2}$$ and $$\lim_{x \to 0}\frac{f(x) - 1}{x^{4}} = \frac{1}{420}$$

Looking at the integral sign in numerator I see that the best way to attack this problem is via L'Hospital Rule. But that requires to show that the integral diverges to $\infty$ as $x \to {\pi/2}^{-}$. Assuming that this is the case I solved the first limit by applying L'Hospital's rule twice. But for the second limit it seems hopeless to try L'Hospital because of denominator $x^{4}$ which might require 4 times its application.
Looking at the functions involved it does not look easy to apply Taylor's series expansions. I am not sure if there is any elegant solution for the second problem. Please let me know any hints or a solution to the second limit.
Update: I tried some simplification along with LHR for the second limit but still the final solution is eluding.
Let $a(x), b(x)$ be the numerator and denominator of $f(x)$. Clearly we can see that
\begin{align}
B &= \lim_{x \to 0}\frac{b(x)}{x^{3}}\notag\\
&= \lim_{x \to 0}\frac{\log\sec x\{x + \log(\sec x + \tan x)\}}{x^{3}}\notag\\
&= -\lim_{x \to 0}\frac{\log\cos x\{x + \log(1 + \sin x) - \log \cos x\}}{x^{3}}\notag\\
&= -\lim_{x \to 0}\frac{\log\cos x}{x^{2}}\cdot\frac{x + \log(1 + \sin x) - \log \cos x}{x}\notag\\
&= -\lim_{x \to 0}\frac{\log(1 + \cos x - 1)}{\cos x - 1}\cdot\frac{\cos x - 1}{x^{2}}\cdot\frac{x + \log(1 + \sin x) - \log \cos x}{x}\notag\\
&= \frac{1}{2}\lim_{x \to 0}\frac{x + \log(1 + \sin x) - \log \cos x}{x}\notag\\
&= \frac{1}{2}\lim_{x \to 0}\left(1 + \frac{\log(1 + \sin x)}{\sin x}\cdot\frac{\sin x}{x} - \frac{\log (1 + \cos x - 1)}{\cos x - 1}\cdot x\cdot \frac{\cos x - 1}{x^{2}}\right)\notag\\
&= \frac{1}{2}\cdot 2 = 1\notag
\end{align}
Thus we can write
\begin{align}
L &= \lim_{x \to 0}\frac{f(x) - 1}{x^{4}}\notag\\
&= \lim_{x \to 0}\frac{a(x) - b(x)}{b(x)x^{4}}\notag\\
&= \lim_{x \to 0}\frac{a(x) - b(x)}{x^{7}}\cdot\frac{x^{3}}{b(x)}\notag\\
&= \lim_{x \to 0}\frac{a(x) - b(x)}{x^{7}}\notag\\
&= \frac{1}{7}\lim_{x \to 0}\frac{a'(x) - b'(x)}{x^{6}}\text{ (via L'Hospital's Rule)}\notag\\
&= \frac{1}{7}\lim_{x \to 0}\frac{3(1 + \sec x)\log\sec x - \tan x\{x + \log(\sec x + \tan x)\} -\log\sec x\{1 + \sec x\}}{x^{6}}\notag\\
&= \frac{1}{7}\lim_{x \to 0}\frac{2(1 + \sec x)\log\sec x - \tan x\{x + \log(\sec x + \tan x)\}}{x^{6}}\notag\\
&= \frac{1}{7}\lim_{x \to 0}\frac{2(1 + \cos x)\log\sec x - \sin x\{x + \log(\sec x + \tan x)\}}{x^{6}\cos x}\notag\\
&= \frac{1}{7}\lim_{x \to 0}\frac{2(1 + \cos x)\log\sec x - \sin x\{x + \log(\sec x + \tan x)\}}{x^{6}}\notag\\
\end{align}
I wonder what could be done to go further.
 [/INST] Here is my work for the first limit:  Let $f(x) = \frac{num(x)}{den(x)}$. We get $\infty/\infty$ so we can use L'Hopital: 
\begin{align*}
\frac{num'(x)}{den'(x)}&=\frac{3(1+\sec(x))\log \sec x}{(\tan(x))(x  + \log(\sec x + \tan x))  + (\log \sec (x)) (1 + \sec(x)) }\\
&= \frac{3(1+\sec(x))\log \sec x}{(\tan(x))[x + (\log \sec x) +\log(1+\sin(x))] + (\log \sec x)(1+\sec(x)) )}\\
&= \frac{3}{\left(\frac{\tan(x)}{1+\sec(x)}\right)\left(1 + \frac{x + \log(1 + \sin(x))}{\log \sec x}\right)+ 1}
\end{align*}
Taking a limit as $x\rightarrow \pi/2^-$ gives $3/2$.
</s>