3. In $\triangle A B C$, it is known that the lengths of the sides opposite to $\angle A, \angle B, \angle C$ are $a, b, c$ respectively, and $S_{\triangle A B C}=a^{2}-(b-c)^{2}$. Then $\tan \frac{A}{2}=$ $\qquad$
3. $\frac{1}{4}$.

Notice,
$$
\begin{array}{l}
a^{2}-(b-c)^{2}=a^{2}-\left(b^{2}-2 b c+c^{2}\right) \\
=-\left(b^{2}+c^{2}-a^{2}\right)+2 b c \\
=-2 b c \cos A+2 b c . \\
\text { Hence } \frac{1}{2} b c \sin A=-2 b c \cos A+2 b c \\
\Rightarrow 4-4 \cos A=\sin A \\
\Rightarrow 8 \sin ^{2} \frac{A}{2}=2 \sin \frac{A}{2} \cdot \cos \frac{A}{2} \\
\Rightarrow \tan \frac{A}{2}=\frac{1}{4} .
\end{array}
$$