Find the values of $a$ and $b$ if the limits exist. Could someone solve this
$$f(x) =
\begin{cases}
x^3+a, & x<0 \\
a\sin\frac{\pi{x}}{3}+b, & 0\leq {x}<2 \\
3, & x=2 \\
\log_2x^{b+1}, & x>2\\
\end{cases}$$
If $\lim_{x\to0}$ and $\lim_{x\to2}$ both exist, find the value of a and b.

We have $$\lim_{x\rightarrow 0^-}f(x)=a; \lim_{x\rightarrow 0^+}f(x)=b;$$ $$\lim_{x\rightarrow 2^-}f(x)=b+a\frac{\sqrt{3}}{2}; \lim_{x\rightarrow 2^+}f(x)=b+1$$
Because $\exists \lim_{x\rightarrow 0}f(x)$ and $\exists \lim_{x\rightarrow 2}f(x)$, then
$a=b$ and $b+1=b+a\frac{\sqrt{3}}{2}$ so $a=b=\frac{2\sqrt{3}}{3}$
