Why is this definite integral divergent? The integral given is
$$\int^{\frac{\pi}{3}}_0 \frac{5}{1+ \cos(4x)}dx$$
The steps I have taken to solve it are first applying the double angle formula for the cosine function
$$\int^{\frac{\pi}{3}}_0 \frac{5}{1+ (2\cos^2(2x)-1)}dx $$
Then simplifying
$$\int^{\frac{\pi}{3}}_0 \frac{5}{2\cos^2(2x)}dx \iff \frac{5}{2}\int^{\frac{\pi}{3}}_0\sec^2(2x) dx$$

$$ \left[\frac{5}{2}\tan(2x) \right]^{\frac{\pi}{3}}_0 = \frac{-5 \sqrt{2}}{4}$$
However trying to verify this on multiple sources such as integral-calculator.com and wolframalpha have returned no value for the integral and state that this is divergent.

Does this integral really have no finite value over this interval? I'm pretty sure I have not made a method mistake so if there is infact no finite solution to this integral  then what does this value of $\frac{-5\sqrt{2}}{4}$ represent?

 A: You properly found that
$$\int\frac{5}{1+ \cos(4x)}dx=\frac{5}{4} \tan (2 x)$$ Now, write
$$I=\int^{\frac{\pi}{3}}_0 \frac{5}{1+ \cos(4x)}dx=\int^{\frac{\pi}{4}-\epsilon}_0 \frac{5}{1+ \cos(4x)}dx+\int_{\frac{\pi}{4}+\epsilon}^{\frac \pi3} \frac{5}{1+ \cos(4x)}dx$$ $$I=\frac{5}{4} \cot (2 \epsilon )+\frac{5}{4} \cot (2 \epsilon )-\frac{5 \sqrt{3}}{4}=\frac{5}{2} \cot (2 \epsilon )-\frac{5 \sqrt{3}}{4}$$
Now, what happens when $\epsilon \to 0$ ?
A: The fact that a positive integrand appears to have negative value should ring alarm bells.
The differential $\frac{d}{dx} \tan 2x$ does not exist at $x = \pi/4$ so the use of the fundamental theorem of calculus breaks down.  You could divide the integral into two intervals, $[0,\pi/4- \delta_1)$ and $(\pi/4+\delta_2,\pi/3]$ to see then that the value becomes infinite as $\delta_1, \delta_2 \searrow 0$.
Postscript:  The derivative of $\tan 2x$ is $2 \sec^2 2x$ and   $\tan (2\pi/3) =-\sqrt 3.$
A: $$I=\int_0^{\pi/3}\frac{5}{1+\cos(4x)}dx=^{u=4x}\frac54\int_0^{4\pi/3}\frac{du}{1+\cos(u)}$$
now the problem is that when $\cos(u)=-1$ the bottom of this fraction is $0$ so your integrand will tend towards infinity. Whilst an antiderivative does exist for this function, the integral of the function cannot have a point of divergence like this within the domain or as can be clearly seen graphically, it will diverge.
