Determine whether piecewise function is continuous, differentiable, has removable discontinuity or non-removable?
Each of the 6 function "pieces" is continuous and differentiable on $\mathbb{R}$ (all polynomials or cos). You have one function piece for each one of the open intervals $[0,1), (1,2),(2,3),(3,4),(4,5]$, so $f$ is continuous and differentiable on all these intervals. (Note that $[0,1)$ and $(4,5]$ are open intervals when considered as subsets of the domain $[0,5]$ of $f$). So you only need to check for continuity and differentiability at the endpoints $x=1,2,3,4$. At each of these endpoints, the left and right-hand limits for $f$ exist, so just check if both coincide with the value of $f$ at the point for $f$ to be continuous. At the endpoints, the left and right-hand derivatives of $f$ also exist, so you only need to check if left and right-hand values coincide. For example, at $x=1$, the limiting values of $x$ and $x^2$ are both 1 and $f(1)=1$, so $f$ is continuous. The left and right hand derivatives are $1$ and $2$, respectively, so $f'$ does not exist at $x=1$.