3. 11 Simplify: $\frac{1-x-x^{2}+x^{3}}{1-2|x|+x^{2}}$
[Solution] Numerator $=(1-x)-x^{2}(1-x)=(1-x)^{2}(1+x)$.
$$\begin{array}{c}
\text { Denominator }=\left\{\begin{array}{ll}
1-2 x+x^{2}=(1-x)^{2}, & (\text { when } x \geqslant 0 \text { ) } \\
1+2 x+x^{2}=(1+x)^{2} . & (\text { when } x<0 \text { ) }
\end{array}\right. \\
\text { Original expression }=\left\{\begin{array}{ll}
\frac{(1-x)^{2}(1+x)}{(1-x)^{2}}=1+x(\text { when } x \geqslant 0 \text { ) } \\
\frac{(1-x)^{2}(1+x)}{(1+x)^{2}}=\frac{(1-x)^{2}}{1+x} . & \text { (when } x<0 \text { ) }
\end{array}\right.
\end{array}$$