# 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.

-
Would the downvoter care to comment? Let me know if I am missing something or if there is any room for improvement in the question. –  Paramanand Singh Jun 15 at 16:45
I don't know why there was a down vote. However, it is not clear what the brackets mean in the denominator. Do you mean the denominator to be $\left(\log\sec x\right)\left(x + \log(\sec x + \tan x)\right)$? Or $\log\sec \left(x(x + \log(x\sec x + \tan x))\right)$? –  Michael Jun 17 at 5:12
@Michael: it means $(\log \sec x)(x + \log(\sec x + \tan x))$ I will update the question to reflect that –  Paramanand Singh Jun 17 at 5:15
@Paramanand. It seems to me that the last two lines should be as follows: \begin{eqnarray*} &=&\frac{1}{7}\lim_{x\rightarrow 0}\frac{2\left( \cos x\right) (1+\cos x)\log \sec x-\sin x\left( x+\log (\sec x+\tan x)\right) }{x^{6}\cos x} \\ &=&\frac{1}{7}\lim_{x\rightarrow 0}\frac{2\left( \cos x\right) (1+\cos x)\log \sec x-\sin x\left( x+\log (\sec x+\tan x)\right) }{x^{6}}. \end{eqnarray*} Can you confirm please? –  Idris Jun 17 at 5:39
@Idris: If you see 3rd last line it begins with $2(1 + \sec x)$ and by multiplying with $\cos x$ it becomes $2 (1 + \cos x)$ so my calculation seems ok. –  Paramanand Singh Jun 17 at 5:45

Let \begin{eqnarray*} g(x) &=&2(1+\cos x)\log \sec x-\sin x\{x+\log (\sec x+\tan x)\} \\ &=&\{\sin x-2(1+\cos x)\}\log \cos x-x\sin x-\sin x\log (1+\sin x) \\ &=&\{\sin x-2(1+\cos x)\}A(x)-B(x)-C(x) \end{eqnarray*} where \begin{eqnarray*} A(x) &=&\log \cos x \\ B(x) &=&x\sin x \\ C(x) &=&\sin x\log (1+\sin x) \end{eqnarray*}

Let us start with $B(x).$ \begin{eqnarray*} B(x) &=&x\sin x \\ &=&x\left[ \sin x-x+\frac{1}{6}x^{3}+x-\frac{1}{6}x^{3}\right] \\ &=&x\left[ \sin x-x+\frac{1}{6}x^{3}\right] +x^{2}-\frac{1}{6}x^{4} \\ &=&x^{6}\left( \frac{\sin x-x+\frac{1}{6}x^{3}}{x^{5}}\right) +x^{2}-\frac{1% }{6}x^{4}. \end{eqnarray*} Now let us consider in the same lines $A(x)$ \begin{eqnarray*} A(x) &=&\log \cos x \\ &=&\log (1+(\cos x-1))-(\cos x-1)+\frac{1}{2}(\cos x-1)^{2} \\ &&+(\cos x-1)-\frac{1}{2}(\cos x-1)^{2} \\ &=&\left( \lim_{x\rightarrow 0}\frac{\log (1+(\cos x-1))-(\cos x-1)+\frac{1}{% 2}(\cos x-1)^{2}}{(\cos x-1)^{3}}\right) \left( \frac{\cos x-1}{x^{2}}% \right) ^{3}\left( x^{6}\right) \\ &&+(\cos x-1)-\frac{1}{2}(\cos x-1)^{2} \end{eqnarray*} It remains $C(x)$ \begin{eqnarray*} C(x) &=&\sin x\log (1+\sin x) \\ &=&\sin x(\log (1+\sin x)-\sin x+\frac{1}{2}\sin ^{2}x-\frac{1}{3}\sin ^{3}x+% \frac{1}{4}\sin ^{4}x \\ &&+\sin x-\frac{1}{2}\sin ^{2}x+\frac{1}{3}\sin ^{3}x-\frac{1}{4}\sin ^{4}x) \\ &=&\sin x\left( \log (1+\sin x)-\sin x+\frac{1}{2}\sin ^{2}x-\frac{1}{3}\sin ^{3}x+\frac{1}{4}\sin ^{4}x\right) \\ &&+\sin ^{2}x-\frac{1}{2}\sin ^{3}x+\frac{1}{3}\sin ^{4}x-\frac{1}{4}\sin ^{5}x \\ &=&(x^{6})\left( \frac{\sin x}{x}\right) ^{6}\left( \frac{\log (1+\sin x)-\sin x+\frac{1}{2}\sin ^{2}x-\frac{1}{3}\sin ^{3}x+\frac{1}{4}\sin ^{4}x}{% \sin ^{5}x}\right) \\ &&+\sin ^{2}x-\frac{1}{2}\sin ^{3}x+\frac{1}{3}\sin ^{4}x-\frac{1}{4}\sin ^{5}x. \end{eqnarray*} Now let us write the resulting expression of $g(x)$ as follows \begin{eqnarray*} g(x) &=&\{\sin x-2(1+\cos x)\}A(x)-B(x)-C(x) \\ &=&\{\sin x-2(1+\cos x)\}\left( \frac{\log (1+(\cos x-1))-(\cos x-1)+\frac{1% }{2}(\cos x-1)^{2}}{(\cos x-1)^{3}}\right) \left( \frac{\cos x-1}{x^{2}}% \right) ^{3}\left( x^{6}\right) \\ &&+\{\sin x-2(1+\cos x)\}\{(\cos x-1)-\frac{1}{2}(\cos x-1)^{2}\} \\ &&-\left( x^{6}\right) \left( \frac{\sin x-x+\frac{1}{6}x^{3}}{x^{5}}\right) -x^{2}+\frac{1}{6}x^{4} \\ &&-(x^{6})\left( \frac{\sin x}{x}\right) ^{6}\left( \frac{\log (1+\sin x)-\sin x+\frac{1}{2}\sin ^{2}x-\frac{1}{3}\sin ^{3}x+\frac{1}{4}\sin ^{4}x}{% \sin ^{5}x}\right) \\ &&-\sin ^{2}x+\frac{1}{2}\sin ^{3}x-\frac{1}{3}\sin ^{4}x+\frac{1}{4}\sin ^{5}x. \end{eqnarray*} Divide $g(x)$ by $x^{6}$ it follows that \begin{eqnarray*} \frac{g(x)}{x^{6}} &=&\left( \sin x-2(1+\cos x)\right) \left( \frac{\log (1+(\cos x-1))-(\cos x-1)+\frac{1}{2}(\cos x-1)^{2}}{(\cos x-1)^{3}}\right) \left( \frac{\cos x-1}{x^{2}}\right) ^{3} \\ &&-\left( \frac{\sin x-x+\frac{1}{6}x^{3}}{x^{5}}\right) -\left( \frac{\sin x% }{x}\right) ^{6}\lim_{x\rightarrow 0}\left( \frac{\log (1+\sin x)-\sin x+% \frac{1}{2}\sin ^{2}x-\frac{1}{3}\sin ^{3}x+\frac{1}{4}\sin ^{4}x}{\sin ^{5}x% }\right) \\ &&+((\sin x-2(1+\cos x))((\cos x-1)-\frac{1}{2}(\cos x-1)^{2}) \\ &&-x^{2}+\frac{1}{6}x^{4}-\sin ^{2}x+\frac{1}{2}\sin ^{3}x-\frac{1}{3}\sin ^{4}x+\frac{1}{4}\sin ^{5}x)/x^{6}. \end{eqnarray*} Let \begin{eqnarray*} h(x) &=&\{\sin x-2(1+\cos x)\}\{(\cos x-1)-\frac{1}{2}(\cos x-1)^{2}\} \\ &&-x^{2}+\frac{1}{6}x^{4}-\sin ^{2}x+\frac{1}{2}\sin ^{3}x-\frac{1}{3}\sin ^{4}x+\frac{1}{4}\sin ^{5}x. \end{eqnarray*} It remains just to prove that \begin{equation*} \lim_{x\rightarrow 0}\frac{h(x)}{x^{6}}=\frac{7}{120} \end{equation*} which is an easy computation (with or without) using LHR.

${\bf UPDATE:}$ The purpose of the first steps previously done reduced the computation of the limit of $% \frac{g(x)}{x^{6}}$ which is a complicated expression to the computation of the limit of $\frac{h(x)}{x^{6}}$ which is very simple comparatively to $% \frac{g(x)}{x^{6}}.$ Indeed, one can use the l'Hospital's rule six times very easily, but before starting to do the derivations some trigonometric simplifications are used as follows. This is

\begin{equation*} h(x)=(\sin x-2(1+\cos x))((\cos x-1)-\frac{1}{2}(\cos x-1)^{2})-x^{2}+\frac{1% }{6}x^{4}-\sin ^{2}x+\frac{1}{2}\sin ^{3}x-\frac{1}{3}\sin ^{4}x+\frac{1}{4}% \sin ^{5}x. \end{equation*}

Develop the product of the first two parenthesis and next simplifying and using power-reduction formulas (https://en.wikipedia.org/wiki/List_of_trigonometric_identities#Multiple-angle_formulae) \begin{equation*} \begin{array}{ccc} \sin ^{2}\theta =\frac{1-\cos 2\theta }{2} & & \cos ^{2}\theta =\frac{% 1+\cos 2\theta }{2} \\ \sin ^{3}\theta =\frac{3\sin \theta -\sin 3\theta }{4} & & \cos ^{3}\theta =% \frac{3\cos \theta +\cos 3\theta }{4} \\ \sin ^{4}\theta =\frac{3-4\cos 2\theta +\cos 4\theta }{8} & & \cos ^{4}\theta =\frac{3+4\cos 2\theta +\cos 4\theta }{8} \\ \sin ^{5}\theta =\frac{10\sin \theta -5\sin 3\theta +\sin 5\theta }{16} & & \cos ^{5}\theta =\frac{10\cos \theta +5\cos 3\theta +\cos 5\theta }{16}% \end{array} \end{equation*}

one then can re-write $h(x)\$as follows \begin{equation*} h(x)=\frac{1}{6}x^{4}-\frac{35}{32}\sin x-x^{2}-\frac{1}{4}\cos x-\frac{5}{6}% \cos 2x+\frac{1}{4}\cos 3x- \frac{1}{24}\cos 4x+\sin 2x-\frac{21}{% 64}\sin 3x+\frac{1}{64}\sin 5x+\frac{7}{8} \end{equation*}

and therefore derivatives are simply calculated (because there is no power on the top of sin and cos), so \begin{equation*} h^{\prime }(x)=\frac{1}{4}\sin x-\frac{35}{32}\cos x-2x+\frac{2}{3}% x^{3}+2\cos 2x-\frac{63}{64}\cos 3x+ \frac{5}{64}\cos 5x+\frac{5}{% 3}\sin 2x-\frac{3}{4}\sin 3x+\frac{1}{6}\sin 4x \end{equation*} \begin{equation*} h^{\prime \prime }(x)=\frac{1}{4}\cos x+\frac{35}{32}\sin x+2x^{2}+\frac{10}{% 3}\cos 2x-\frac{9}{4}\cos 3x+ \frac{2}{3}\cos 4x-4\sin 2x+\frac{% 189}{64}\sin 3x-\frac{25}{64}\sin 5x- 2 \end{equation*} \begin{equation*} h^{\prime \prime \prime }(x)=4x+\frac{35}{32}\cos x-\frac{1}{4}\sin x-8\cos 2x+\frac{567}{64}\cos 3x- \frac{125}{64}\cos 5x-\frac{20}{3}\sin 2x+\frac{27}{4}\sin 3x-\frac{8}{3}\sin 4x \end{equation*} \begin{equation*} h^{(4)}(x)=\frac{81}{4}\cos 3x-\frac{35}{32}\sin x-\frac{40}{3}\cos 2x-\frac{% 1}{4}\cos x-\frac{32}{3} \cos 4x+16\sin 2x-\frac{1701}{64}\sin 3x+% \frac{625}{64}\sin 5x+4 \end{equation*} \begin{equation*} h^{(5)}(x)=\frac{1}{4}\sin x-\frac{35}{32}\cos x+32\cos 2x-\frac{5103}{64}% \cos 3x+ \frac{3125}{64}\cos 5x+\frac{80}{3}\sin 2x-\frac{243}{4}% \sin 3x+\frac{128}{3}\sin 4x \end{equation*} \begin{equation*} h^{(6)}(x)=\frac{1}{4}\cos x+\frac{35}{32}\sin x+\frac{160}{3}\cos 2x-\frac{% 729}{4}\cos 3x+ \frac{512}{3}\cos 4x-64\sin 2x+\frac{15\,309}{64}% \sin 3x-\frac{15\,625}{64} \sin 5x \end{equation*}

\begin{eqnarray*} \lim_{x\rightarrow 0}\frac{h(x)}{x^{6}} &=&\lim_{x\rightarrow 0}\frac{% h^{\prime }(x)}{6x^{5}}=\cdots =\lim_{x\rightarrow 0}\frac{h^{(6)}(x)}{6!}=% \frac{h^{(6)}(0)}{6!} \\ &=&\frac{1}{6!}\left( \frac{1}{4}\cos (0)+\frac{160}{3}\cos (0)-\frac{729}{4}% \cos (0)+ \frac{512}{3}\cos (0)\right) \\ &=&\frac{1}{6!}\left( \frac{1}{4}+\frac{160}{3}-\frac{729}{4}+\frac{512}{3}% \right) \\ &=&\frac{7}{120}. \end{eqnarray*} By the way, one have to verify that at each level (except the last one) the current derivative is $zero$ for $x=0,$ in order to be able to re-use LHR.

-
@paramanand. I have skipped some explanations related to standard limits because I believe they are evident for you. –  Idris Jun 17 at 6:30
See an approach based on Taylor series in my answer. –  Paramanand Singh Jun 17 at 10:55
The computation you have done are based on Taylor series expansions of $\sin x, \cos x, \log(1 + x)$ and are are bit too lengthy. Also the expression $h(x)$ at the end of your answer seems complicated and I believe calculation of limit of $h(x)/x^{6}$ is also a bit laborious. I am still looking for a cleaner solution. +1 for these heavy computations by the way. –  Paramanand Singh Jun 18 at 3:56
@Paramanand The calculation of the limit of $h(x)/x^6$ by LHR are very easy. I can do them if you want. If you want them without LHR they will be somewhat lengthy but this due to the higher order $x^6$. For me, the heart of the solution is the first part I did yesterday because of the manipulations I did are not usual. –  Idris Jun 18 at 4:02
@ParamanandSingh. Concerning the first step of yesterday, I mean the reduction of computation of limit of $g(x)/x^6$ to the computation of the limit of $h(x)/x^6$, it is possible to use Taylor series in the same fashion as I did my manipulations. Also, I hope this time you are convinced that the computation of the limit of $h(x)/x^6$ is simple (and lengthy because the higher order is involved $x^6$.) I am happy to have contributed in these calculations. In doing so, I am now able to compute a limit which is still opened, I have asked months ago it is about $(tan(sin(x))-sin(tan(x)))/x^7$. –  Idris Jun 18 at 6:40

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$.

-
See an approach based on Taylor series in my answer. –  Paramanand Singh Jun 17 at 10:54

While I am still searching for a simple solution based on LHR, I found that method of Taylor series can also be applied without much difficulty. However we will need to make the substitution $\tan x = t$ so that $\sec x = \sqrt{1 + t^{2}}$ and as $x \to 0$ we also have $t \to 0$. We can do some simplification as follows \begin{align} A &= \lim_{x \to 0}\frac{2(1 + \sec x)\log \sec x - \tan x\{x + \log(\sec x + \tan x)\}}{x^{6}}\notag\\ &= \lim_{x \to 0}\frac{(1 + \sec x)\log(1 + \tan^{2}x) - \tan x\{x + \log(\sec x + \tan x)\}}{\tan^{6}x}\cdot\frac{\tan^{6}x}{x^{6}}\notag\\ &= \lim_{t \to 0}\frac{(1 + \sqrt{1 + t^{2}})\log(1 + t^{2}) - t\{\tan^{-1}t + \log(t + \sqrt{1 + t^{2}})\}}{t^{6}}\notag\\ &= \lim_{t \to 0}\frac{g(t) - h(t)}{t^{6}}\notag \end{align} The Taylor series expansions of functions in the numerator are easy to find with the exception of $\log(t + \sqrt{1 + t^{2}})$. But then we know that \begin{align} \log(t + \sqrt{1 + t^{2}}) &= \int_{0}^{t}\frac{dx}{\sqrt{1 + x^{2}}}\notag\\ &= \int_{0}^{t}\left(1 - \frac{x^{2}}{2} + \frac{3x^{4}}{8} + o(x^{4})\right)\,dx\notag\\ &= t - \frac{t^{3}}{6} + \frac{3t^{5}}{40} + o(t^{5})\notag\\ \end{align} Thus we can see that \begin{align} h(t) &= t\{\tan^{-1}t + \log(t + \sqrt{1 + t^{2}})\}\notag\\ &= t\left(t - \frac{t^{3}}{3} + \frac{t^{5}}{5} + t - \frac{t^{3}}{6} + \frac{3t^{5}}{40} + o(t^{5})\right)\notag\\ &= 2t^{2} - \frac{t^{4}}{2} + \frac{11t^{6}}{40} + o(t^{6})\notag \end{align} And further \begin{align} g(t) &= (1 + \sqrt{1 + t^{2}})\log(1 + t^{2})\notag\\ &= \left(2 + \frac{t^{2}}{2} - \frac{t^{4}}{8} + o(t^{4})\right)\left(t^{2} - \frac{t^{4}}{2} + \frac{t^{6}}{3} + o(t^{6})\right)\notag\\ &= t^{2}\left(2 + \frac{t^{2}}{2} - \frac{t^{4}}{8} + o(t^{4})\right)\left(1 - \frac{t^{2}}{2} + \frac{t^{4}}{3} + o(t^{4})\right)\notag\\ &= t^{2}\left(2 - \frac{t^{2}}{2} + \frac{7t^{4}}{24} + o(t^{4})\right)\notag\\ &= 2t^{2} - \frac{t^{4}}{2} + \frac{7t^{6}}{24} + o(t^{6})\notag \end{align} It is now clear that $$A = \lim_{t \to 0}\frac{g(t) - h(t)}{t^{6}} = \frac{7}{24} - \frac{11}{40} = \frac{35 - 33}{120} = \frac{1}{60}$$ and hence $$L = \frac{A}{7} = \frac{1}{420}$$ Getting rid of trigonometric functions $\sec x, \tan x$ does help in having simpler Taylor series which require very little amount of calculation. The only trigonometric function is $\tan^{-1}t$ which has the simplest Taylor series.

Another perhaps simpler approach via Taylor series would be to use the series for $\sec x, \tan x$ followed by integration (to get series for $\log \sec x$, $\log(\sec x + \tan x)$) and thus finding a Taylor series for $f(x)$ directly leading to $$f(x) = 1 + \frac{x^{4}}{420} + o(x^{4})$$ Thus we can start with $$\tan x = x + \frac{x^{3}}{3} + \frac{2x^{5}}{15} + o(x^{5})$$ and $$\sec x = \dfrac{1}{\cos x} = \dfrac{1}{1 - \dfrac{x^{2}}{2} + \dfrac{x^{4}}{24} + o(x^{4})} = 1 + \frac{x^{2}}{2} + \frac{5x^{4}}{24} + o(x^{4})$$ and on integrating the series for $\tan x, \sec x$ we get \begin{align} \log \sec x &= \frac{x^{2}}{2} + \frac{x^{4}}{12} + \frac{x^{6}}{45} + o(x^{6})\notag\\ \log(\sec x + \tan x) &= x + \frac{x^{3}}{6} + \frac{x^{5}}{24} + o(x^{5})\notag\\ \Rightarrow (1 + \sec t)\log \sec t &= \left(2 + \frac{t^{2}}{2} + \frac{5t^{4}}{24} + o(t^{4})\right)\left(\frac{t^{2}}{2} + \frac{t^{4}}{12} + \frac{t^{6}}{45} + o(t^{6})\right)\notag\\ &= t^{2}\left(2 + \frac{t^{2}}{2} + \frac{5t^{4}}{24} + o(t^{4})\right)\left(\frac{1}{2} + \frac{t^{2}}{12} + \frac{t^{4}}{45} + o(t^{4})\right)\notag\\ &= t^{2}\left(1 + \frac{5t^{2}}{12} + \frac{137t^{4}}{720} + o(t^{4})\right)\notag\\ &= t^{2} + \frac{5t^{4}}{12} + \frac{137t^{6}}{720} + o(t^{6})\notag \end{align} It follows that $$a(x) = 3\int_{0}^{x}(1 + \sec t)\log\sec t\,dt = x^{3}\left(1 + \frac{x^{2}}{4} + \frac{137x^{4}}{1680} + o(x^{4})\right)$$ and \begin{align} b(x) &= \{x + \log(\sec x + \tan x)\}\log \sec x\notag\\ &= \left(2x + \frac{x^{3}}{6} + \frac{x^{5}}{24} + o(x^{5})\right)\left(\frac{x^{2}}{2} + \frac{x^{4}}{12} + \frac{x^{6}}{45} + o(x^{6})\right)\notag\\ &= x^{3}\left(2 + \frac{x^{2}}{6} + \frac{x^{4}}{24} + o(x^{4})\right)\left(\frac{1}{2} + \frac{x^{2}}{12} + \frac{x^{4}}{45} + o(x^{4})\right)\notag\\ &= x^{3}\left(1 + \frac{x^{2}}{4} + \frac{19x^{4}}{240} + o(x^{4})\right)\notag \end{align} Thus we can see that \begin{align} f(x) &= \frac{a(x)}{b(x)} = \dfrac{1 + \dfrac{x^{2}}{4} + \dfrac{137x^{4}}{1680} + o(x^{4})}{1 + \dfrac{x^{2}}{4} + \dfrac{19x^{4}}{240} + o(x^{4})}\notag\\ &= 1 + px^{2} + qx^{4} + o(x^{4})\notag \end{align} where $$p + \frac{1}{4} = \frac{1}{4},\, q + \frac{p}{4} + \frac{19}{240} = \frac{137}{1680}$$ so that $$p = 0, q = \frac{137 - 133}{1680} = \frac{4}{1680} = \frac{1}{420}$$ and finally we get $$f(x) = 1 + \frac{x^{4}}{420} + o(x^{4})$$ as desired. This however does involve the division of power series one time and multiplication of power series 2 times (not to mention the use of not so familiar Taylor series for $\sec x, \tan x$ in the first place). The first approach which I have given in my answer uses the product of two series only one time and one application of LHR (given in the question itself).

-