Problem 807 (difficulty: 4/10)
Find the maximal intervals for which the following functions are convex or concave.
(1) \(\displaystyle e^x\), (2) \(\displaystyle \log x\), (3) \(\displaystyle |x|\), (4) \(\displaystyle x^a\) (\(\displaystyle a\in\R\)), (5) \(\displaystyle a^x\) (\(\displaystyle a>0\)) (6) \(\displaystyle \sin x\).