2. Given the parabola $y=-x^{2}+m x-1$, points $A(3,0), B(0,3)$, find the range of $m$ when the parabola intersects the line segment $A B$ at two distinct points.
2. Solution Convert to the system of equations $\left\{\begin{array}{l}y=-x^{2}+m x-1 \\ x+y-3=0,(0 \leqslant x \leqslant 3)\end{array}\right.$ having two different solutions, which means $x^{2}-(m+1) x+4=0$ has two different solutions. Clearly, $x \neq 0$, and $m=x+\frac{4}{x}-1$. The function $f(x)=x+\frac{4}{x}-1$ is monotonically decreasing when $x \in(0,2]$, with a range of $[3,+\infty)$; it is monotonically increasing when $x \in[2,4]$, with a range of $\left[3, \frac{10}{3}\right]$. Therefore, $m \in \left[3, \frac{10}{3}\right]$.