<s>[INST] Calculating $\int_0^{\pi/3}\cos^2x+\dfrac{1}{\cos^2x}\mathrm{d}\,x$ I've been given the following exercise:

Show that the exact value of $$\int_0^{\pi/3}\cos^2x+\frac{1}{\cos^2x}\,\mathrm{d}x = \frac{\pi}{6}+\frac{9}{8}\sqrt{3}$$

Can someone help me with this?
 [/INST] This is an answer that requires the knowledge of simple functions such as $\tan$, you can do it without knowing $\sec$ and e.c. Other answers are great, but I am unsure you know all the functions they use.
You can also notice that $\frac{d}{dx}\tan(x)=\frac{1}{\cos(x)^2}$ and that $\cos(x)^2= \frac{1+cos(2x)}{2}$ Thus giving us:
$$\int^{\frac{\pi}{3}}_{0}\cos(x)^2+\frac{1}{\cos(x)^2}dx=\int^{\frac{\pi}{3}}_{0}\frac{1+\cos(2x)}{2}dx+ \left [ \tan(x) \right ]_0^{\frac{\pi}{3}}=\frac{1}{2}\int^{\frac{\pi}{3}}_{0}\cos(2x)dx+\frac{1}{2}\int^{\frac{\pi}{3}}_{0}dx+ \sqrt{3}$$
Now make a variable change:
$u=2x \rightarrow du=2dt$ so $\frac{du}{2}=dt$. We have now:
$$\frac{1}{4}\int^{u(\frac{\pi}{3})}_{0}\cos(u)dx+\frac{1}{2}\int^{\frac{\pi}{3}}_{0}dx+ \sqrt{3}=\frac{1}{4}\left [ sin(x) \right ]_{0}^{\frac{2\pi}{3}}+\frac{1}{2}\left [ x \right ]_0^{\frac{\pi}{3}}+ \sqrt{3}=\frac{\sqrt{3}}{8}+\frac{\pi}{6} + \sqrt{3}=\frac{9\sqrt{3}}{8}+\frac{\pi}{6}$$
</s>