If the function
$$f(x) = \begin{cases} 1 + \sin\frac{\pi}{2}, & -\infty < x \le 1 \\ ax + b, & 1 < x < 3 \\ 6 \tan\frac{x\pi}{12}, & 3 \le x < 6 \end{cases}$$
is continuous in $(-\infty, 6)$, then the values of $a$ and $b$ are respectively.
Show Hint
Always ensure your trigonometric values are rock solid. Forgetting that $\sin(\frac{\pi}{2}) = 1$ or $\tan(\frac{\pi}{4}) = 1$ will derail an otherwise simple algebra problem!
Step 1: Use the joining points.
A piecewise function is continuous only when the pieces meet at the break points. Here the breaks are at $x=1$ and $x=3$, so the left and right values must agree there.
Step 2: Match at $x=1$.
The first piece gives $1+\sin\tfrac{\pi}{2} = 1+1 = 2$. The middle piece gives $a+b$. So $a+b = 2$.
Step 3: Match at $x=3$.
The middle piece gives $3a+b$. The last piece gives $6\tan\tfrac{3\pi}{12} = 6\tan\tfrac{\pi}{4} = 6$. So $3a+b = 6$.
Step 4: Solve the pair.
Subtract the first from the second: $2a = 4$, so $a = 2$. Then $b = 2-a = 0$.
\[ \boxed{a=2,\ b=0} \]