<s>[INST] Two interesting and basic integrals. Show: $$\int_0^\pi \sqrt{1 + \sin(x)}\,dx.\ = 4$$
and $$\int_0^\pi \frac{xdx}{1 + \cos^2(x)} = \frac{\pi^2}{2\sqrt{2}}$$
 [/INST] For the first one, you can use the identity $\sin(x)=-\cos(\frac{\pi}{2}+x)$.
Then by half angle formula
$$1+\sin(x)=1- \cos(\frac{\pi}{2}+x)=2 \sin^2(\frac{\pi}{4}+\frac{x}{2})$$
Thus
$$\int_0^\pi \sqrt{1 + \sin(x)}\,dx.\ = \int_0^\pi \sqrt{2}\sin(\frac{\pi}{4}+\frac{x}{2})\,dx=-2\sqrt{2}\cos(\frac{\pi}{4}+\frac{x}{2})|_0^\pi=4$$
Second one
Let $I=\int_0^\pi \frac{xdx}{1 + \cos^2(x)}$.
Let $u= \pi-x$. Then
$$I= \int_0^\pi \frac{(\pi-u)}{1 + \cos^2(\pi-u)}du=\int_0^\pi \frac{\pi}{1 + \cos^2(u)}du -I $$
Thus
$$2I=\pi \int_0^\pi \frac{1}{1+\cos^2(u)} du=2 \pi \int_0^\frac{\pi}{2} \frac{1}{1+\cos^2(u)} du$$
by the symmetry about $u=\frac{\pi}{2}$.
Thus
$$I= \pi \int_0^\frac{\pi}{2} \frac{1}{1+\cos^2(u)} du= \pi \int_0^\frac{\pi}{2} \frac{\sec^2(u)}{1+\sec^2(u)} du=\pi \int_0^\frac{\pi}{2} \frac{\sec^2(u)}{2+\tan^2(u)} du$$
This integral becomes a trivial improper integral after the obvious substitution $v =\tan(u)$.
P.S. $I= \pi \int_0^\frac{\pi}{2} \frac{1}{1+\cos^2(u)} du$ can also be calculated with the standard substitution $t=\tan(\frac{u}{2})$.
</s>