If $$f(x)=\left\{\begin{matrix} \sin\bigg(\pi(x+p)\bigg)\;\; , &x<-1 \\ q\bigg(\lfloor x \rfloor^2+\lfloor x \rfloor\bigg)+1\;\;,\;\;& x\geq -1 \end{matrix}\right.$$ where $\lfloor x \rfloor $ represent the integer part of $x,$ . Then what values of $p,q$ function $f(x)$ is continuous at $x=-1$
what i try: If function $f(x)$ is continuous at $x=-1.$ Then
$$f(-1^{-})=f(-1^+)=f(1)$$
Here $f(-1^{-})=\lim_{h\rightarrow 0}f(-1-h)=\lim_{h\rightarrow 0}\sin(\pi(-1-h)+\pi p)=\sin(-\pi +\pi p)=-\sin(\pi p)$
and $f(-1^+)=\lim_{h\rightarrow 0}f(-1+h)=\lim_{h\rightarrow 0}q\bigg(\lfloor h-1\rfloor^2+\lfloor h-1\rfloor\bigg)+1=-q+1$
and $f(-1)=q\bigg(1-1\bigg)+1=1$
so for continuity at $x=-1,$
$-\sin(\pi p)=1-q=1$, we get $q=0$ and $\displaystyle \sin(\pi p)=-1=-\sin\bigg(2n\pi+\frac{3\pi}{2}\bigg)\Longrightarrow p=2n+\frac{3}{2}$
so we have $p=2n+1.5$ and $q=0,$ But answer given as $q\in \mathbb{R}$
please help me How $q\in \mathbb{R}$ and whats wrong in my answer. Thanks