Let \[f(x) =
\begin{cases}
3x^2 + 2&\text{if } x\le 3, \\
ax - 1 &\text{if } x>3.
\end{cases}
\]Find $a$ if the graph of $y=f(x)$ is continuous (which means the graph can be drawn without lifting your pencil from the paper).
To have a continuous graph, the two pieces of the function must meet at $x=3$. That means the outputs of the two expressions must be equal when $x=3$. So I need to find $a$ such that \[3(3)^2 + 2 = a(3) - 1.\] Simplifying the left side, I get \[29 = a(3) - 1.\] Adding $1$ to both sides, I get \[30 = a(3).\] Dividing both sides by $3$, I get \[a = 10.\] 