Celeb Glow
news | April 21, 2026

Find the antiderivative for $f(x)=\frac{1}{1+\cos^2x}$

$\begingroup$

Evaluate $\int_0^x \frac{dt}{1+\cos^2t}$ $\forall x \in \mathbb{R}$

I got this question in an analysis exam, and I did what everybody does (this), I made $u=\tan t$ and I got $\frac{1}{\sqrt2}\tan^{-1}\left(\frac{\tan x}{\sqrt2}\right)$ but I know this is wrong because $\tan x$ is not continuous in every $[0,x]$, here it's solved until $\pi$, but my limit is $x$ so I'm not sure what should I do.

Also, we have the integral of a positive amount, so my answer should be an increasing function...

Here is explained why this happens (which I already know), and the answers there don't solve the integral between $0$ and $x$. One answer gives a possible result (that have to be adapted, since there it is indefinite), but no deduction of it. The answer given here is much more complete and perfectly address my specific question.

$\endgroup$ 3

1 Answer

$\begingroup$

We have $$\dfrac1{1+\cos^2(t)} = \dfrac{\sec^2(t)}{\sec^2(t)+1} = \dfrac{\sec^2(t)}{2+\tan^2(t)}$$ This gives us $$I(x) = \int_0^x \dfrac{dt}{1+\cos^2(t)} = \int_0^x \dfrac{\sec^2(t)}{2+\tan^2(t)}dt$$ Setting $y=\tan(t)$, we have $$I(x) = \int_0^{\tan(x)} \dfrac{dy}{2+y^2} = \left.\dfrac1{\sqrt2}\arctan\left(\dfrac{y}{\sqrt2}\right) \right\vert_0^{\tan(x)} = \dfrac1{\sqrt2}\arctan\left(\dfrac{\tan(x)}{\sqrt2}\right)$$ This is valid for $x \in [0,\pi/2]$. For $x>\pi/2$, express $x$ as $n\pi+y$, where $y \in [-\pi/2,\pi/2]$, we then have $$I(x) = \dfrac{n\pi}{\sqrt2}+\dfrac1{\sqrt2}\arctan\left(\dfrac{\tan(y)}{\sqrt2}\right)$$ Hence, $I(x) > 0$ for all $x > 0$.

$\endgroup$ 3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy