Q.
Let $f: R \rightarrow R$ be a function defined as
$f(x)=a \sin \left(\frac{\pi[x]}{2}\right)+[2-x], a \in R ,$
where [t] is the greatest integer less than or equal to $t$. If $\displaystyle\lim _{x \rightarrow-1} f(x)$ exists, then the value of $\int_0^4 f(x) d x$ is equal to :
Solution: