<s>[INST] Show that $|f(x)| \leq 2 \pi^2/9$ The problem is stated as:

Show that $|f(x)| \leq 2 \pi^2/9$ for $ |x| \leq \pi/3$ where $f(x) = \int_{0}^{x}\frac{t}{cos(t)}dt$

Solution:
So, first of all, I try to form a Maclaurin expression around $x = 0$. Without digging into the calculations too deep, I get the following:
$f(0) = 0 \\ f'(0) = 0 \\ f''(0) = 1$
For $f^{(3)}(\theta x) = \dfrac{2\sin\left(\theta x\right)\left(\theta x\sin\left(x\right)+\cos\left(\theta x\right)\right)}{\cos^3\left(\theta x\right)}+\dfrac{\theta x}{\cos\left(\theta x\right)}$
Where $\theta \in (0,1)$.
Therefore, we have that our Maclaurin expansion can be written in the following form: $$f(x) = \frac{x^2}{2} +f^{(3)}(\theta x) = \dfrac{2\sin\left(\theta x\right)\left(\theta x\sin\left(x\right)+\cos\left(\theta x\right)\right)}{\cos^3\left(\theta x\right)}+\dfrac{\theta x}{\cos\left(\theta x\right)}$$
Taking the absolute value of both sides, and applying the triangle ineqality, we get:
$|f(x)| \leq \frac{x^2}{2!} + \frac{1}{3!}|\dfrac{2\sin\left(\theta x\right)\left(\theta x\sin\left(x\right)+\cos\left(\theta x\right)\right)}{\cos^3\left(\theta x\right)}| + |\dfrac{\theta x}{\cos\left(\theta x\right)}|$
Now, we notice that we have:
$ 1/2 \leq |\cos(\theta x)| \leq 1 \\ 0 \leq |\sin(\theta x)| \leq \sqrt{3}/2 \\ 0 \leq |\theta x |\leq \pi/3$
for $|x| \leq \pi/3$
Applying these to our inequality above, we have:
$|f(x)| \leq \pi^2/18 + \frac{1}{3}\frac{\sqrt{3}/2(\pi/3 *\sqrt{3}/2 + 1)}{1/8}+\frac{\pi/3}{1/2}$
However, when I calculate the RHS, I get a much bigger number than $2\pi^2 / 9$. How can I proceed from this?
Thanks!
 [/INST] Here is a simpler way:
For $|x| \leq \frac{\pi}{3}, \cos x \geq \frac{1}{2}$ or $\frac{1}{\cos x} \leq 2$
So, $ \displaystyle |f(x)| = \left|\int_{0}^{x}\frac{t}{cos(t)} ~ dt \right| \leq \int_{0}^{|x|} 2t ~ dt = x^2$.
As $ \displaystyle |x| \leq \frac{\pi}{3}, |f(x)| \leq \frac{\pi^2}{9} \leq \frac{2\pi^2}{9}$
</s>