Example 4. What real number is $m$ when the two roots of the equation $x^{2}-2 m x$ $+\mathrm{m}^{2}-1=0$ are both greater than -2 and less than 4?
Solution 1: Since $\Delta=(-2 m)^{2}-4\left(m^{2}-1\right)$ $=4>0$,
$\therefore$ the equation has two distinct real roots.
Let the two roots be $x_{1}$ and $x_{2}$, then
$$
\left\{\begin{array}{l}
x_{1}+x_{2}=2 m \\
x_{1} x_{2}=m^{2}-1
\end{array}\right.
$$
$\because$ both roots of the equation are greater than -2 and less than 4,
$$
\therefore\left\{\begin{array}{l}
-2<x_{1}<4, \\
-2<x_{2}<4 .
\end{array}\right.
$$

Thus, $\left\{\begin{array}{c}-4<x_{1}+x_{2}<8, \\ 4<x_{1} x_{2}<16 .\end{array}\right.$
which means $\left\{\begin{array}{l}-4<2 \mathrm{~m}<8, \\ 4<\mathrm{m}^{2}-1<16 .\end{array}\right.$
From (1), we get $-2<m<4$.
From (2), we get $-\sqrt{17}<\mathrm{m}<-\sqrt{5}$ or $\sqrt{5}<\mathrm{m}<\sqrt{17}$.
$$
\therefore \sqrt{5}<\mathrm{m}<4 \text {. }
$$

That is, when $\sqrt{5}<\mathrm{m}<4$, the original equation has two roots both greater than -2 and less than 4.

Solution 2: From the discriminant being greater than 0, we know the equation has two distinct real roots.
If we let the two roots be $\mathrm{x}_{1}, \mathrm{x}_{2}$, then
$$
\left\{\begin{array}{l}
x_{1}=\frac{2 m+2}{2}=m+1 \\
x_{2}=\frac{2 m-2}{2}=m-1
\end{array}\right.
$$

By the problem statement:
$$
\left\{\begin{array}{l}
-2<x_{1}<4 \\
-2<x_{2}<4
\end{array}\right.
$$

From (1), we get $-3<m<3$, and from (2), we get $-1<\mathrm{m}<5$.
$$
\therefore-1<\mathrm{m}<3 \text {. }
$$

Which solution is reasonable? Combining the two solutions, we divide it into three parts: $-1<\mathrm{m} \leqslant \sqrt{5}, \sqrt{5}$ $<\mathrm{m}<3,3 \leqslant \mathrm{~m}<4$, and then test values within these ranges.
When $-1<m \leqslant \sqrt{5}$,
take $\mathrm{m}=0$, the equation is: $\mathrm{x}^{2}-1=0, \mathrm{x}= \pm 1$. It meets the problem's requirements;

take $m=\sqrt{5}$, the equation is: $x^{2}-2 \sqrt{5} x$ $+4=0, x=\sqrt{5} \pm 1$. It meets the problem's requirements;
When $\sqrt{5}<\mathrm{m}<3$,
take $m=2 \cdot \frac{1}{2}$, the equation is: $4 x^{2}-20 x+21$ $=0, x_{1}=\frac{5}{2}, x_{2}=\frac{7}{2}$, it meets the problem's requirements.
When $3 \leqslant \mathrm{~m}<4$,
take $m=3$, the equation is: $x^{2}-6 x+8=0$. $\mathrm{x}_{1}=2, \mathrm{x}_{2}=4$. It does not meet the problem's requirements;

take $\mathrm{m}=3 \frac{1}{2}$, the equation is: $4 \mathrm{x}^{2}-28 \mathrm{x}+45=0$. $\mathrm{x}_{1}=4 \frac{1}{2}, \mathrm{x}_{2}=2 \frac{1}{2}$. It does not meet the problem's requirements. Therefore, we conclude that Solution 1 is incorrect.