Having fun integral $\int_0^{\pi/4} \cos x \arctan(\cos x)\, dx$

848 Views Asked by At

Playing around with the inverse trigonometric function integration, I found a nice closed-form of the following integral

$$\int_0^{\pi/4} \cos x \arctan(\cos x)\, dx=\frac{3\sqrt{2}-1}{4}\pi-\frac{3\sqrt{2}}{2}\arctan\sqrt{2}$$

which numerically agrees with output of Wolfram Alpha. I am wondering, what is the nicest way (or the most complicated way) to obtain the given result. I would love to see how Mathematics SE users prove it. Any method is welcome. Thank you. (>‿◠)✌

3

There are 3 best solutions below

1
On BEST ANSWER

Integrate by parts $$\int\cos x\arctan(\cos x)dx$$

$$=\arctan(\cos x)\int\cos x\ dx-\int\left(\frac{d[\arctan(\cos x)]}{dx}\int\cos x\ dx\right)dx$$

$$=\arctan(\cos x)\sin x-\int\left(\frac{-\sin x}{1+\cos^2x}\cdot\sin x\right)dx$$

Now, $$\int\frac{\sin^2x}{1+\cos^2x}dx=\int\frac{2-(1+\cos^2x)}{1+\cos^2x}dx$$

$$=2\int\frac{dx}{1+\cos^2x}-\int dx$$

$$=2\int\frac{\sec^2x\ dx}{2+\tan^2x}-x$$

0
On

Integrate by parts: $$\int cos(x)arctan(cos(x))dx=sin(x)arctan(cos(x))+\int\frac{sin^2(x)}{1+cos^2(x)}dx$$

Rewrite: $$\int cos(x)arctan(cos(x))dx=sin(x)arctan(cos(x))+\int\frac{2}{1+cos^2(x)}dx-x$$

To obtain this integral, we differentiate $arctan(\alpha tan(x))$, which results in $\frac{\alpha}{cos^2(x)+(\alpha sin(x))^2}$.

So we get: $$\int \frac{\frac{1}{2}\sqrt{2}}{cos^2(x)+\frac{1}{2}sin^2(x)}dx=arctan\left(\frac{1}{2}\sqrt{2}tan(x)\right)$$

Indefinite integral: $$\int cos(x)arctan(cos(x))dx=sin(x)arctan(cos(x))+\sqrt{2}arctan(\frac{1}{2}\sqrt{2}tan(x))-x$$

Plugging in the boundaries is left as an exercise to the reader.

0
On

I'm aware that I'm late but I found this other cool way to solve it:

$$\begin{aligned} \int_0^{\frac{\pi}{4}}\cos x\arctan(\cos x)dx &=\int_0^{\frac{\pi}{4}}\cos x\left[\arctan(y)\right|_{0}^{\cos x}dx\\ &=\int_0^{\frac{\pi}{4}}\int_0^{\cos x}\dfrac{\cos x}{1+y^2}dydx \end{aligned}$$

Now, using Fubini's theorem we can interchange the order of integration by using this equivalent interval: $$ \left\{ \begin{aligned} 0\leq &x\leq \dfrac{\pi}{4}\\ 0\leq &y\leq \dfrac{\sqrt 2}{2} \end{aligned} \right\} \cup \left\{ \begin{aligned} 0\leq &x\leq \arccos y\\ \dfrac{\sqrt 2}{2}\leq &y\leq 1 \end{aligned} \right\} $$

Now we proceed: $$\begin{aligned} \int_0^{\frac{\pi}{4}}\int_0^{\cos x}\dfrac{\cos x}{1+y^2}dydx &=\overbrace{\int_0^{\frac{\sqrt 2}{2}}\dfrac{dy}{1+y^2}\int_0^{\frac{\pi}{4}}\cos x dx}^{\frac{\sqrt 2}{2}\arctan(\frac{\sqrt 2}{2})}+\int_{\frac{\sqrt 2}{2}}^1\int_0^{\arccos y}\dfrac{\cos x}{1+y^2}dydx \\ &=\dfrac{\sqrt 2}{2}\arctan\left(\dfrac{\sqrt 2}{2}\right)+\int_{\frac{\sqrt 2}{2}}^1\dfrac{\sqrt{1-y^2}}{1+y^2}dy\\ &=\dfrac{2\sqrt 2-1}{4}\pi+\dfrac{\sqrt 2}{2}\arctan\left(\dfrac{\sqrt 2}{2}\right)-\sqrt 2\arctan(\sqrt 2) \end{aligned}$$

The result numerically wise is the same, but I don't know how to manipulate it into the OP's form.

$\mathbf{EDIT:}$

Nevermind, using the indentity

$$\arctan(x)+\arctan\left(\dfrac{1}{x}\right)=\dfrac{\pi}{2},$$

for $x=\sqrt{2}$ it is then trivial to get to the OP's form of result.