Prove that
(a) \(\log (1+e^t)\le t+\log (2)\) for all \(t\ge 0\);
(b) if \(f\) is a real valued function in \(L^1([0,1])\) then \[ \lim _{n\to \infty }\frac {1}{n}\int _0^1 \log (1+e^{n f(x)})\,dx =\int _0^1 f^+(x)\,dx, \] where \(f^+(x)=f(x)\) if \(f(x)\ge 0\) and \(f^+(x)=0\) if \(f(x)<0\).