Trước hết ta chứng minh: $\tan x>x,\forall x\in(0;\dfrac{\pi}{4})$.
Xét hàm: $f(x)=\tan x-x,x\in(0;\dfrac{\pi}{4})$
Ta có: $f'(x)=\dfrac{1}{\cos^2x}-1=\tan^2x>0,\forall x\in(0;\dfrac{\pi}{4})$
Suy ra: $f(x)$ đồng biến trên: $(0;\dfrac{\pi}{4})$
$\Rightarrow f(x)>f(0)=0,\forall x\in(0;\dfrac{\pi}{4})$
Từ đó ta có:
$\int\limits_0^{\frac{\pi}{4}}\max(x,\tan x)dx$
$=\int\limits_0^{\frac{\pi}{4}}\tan xdx$
$=-\int\limits_0^{\frac{\pi}{4}}\dfrac{d(\cos x)}{\cos x}$
$=-\ln(\cos x)\left|\begin{array}{l}\dfrac{\pi}{4}\\0\end{array}\right.=\dfrac{\ln 2}{2}$