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. (>‿◠)✌
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$$