\[1)\ f(x) = \frac{x^{3} + x^{2} + x}{x + 1};\]
\[= \frac{2x^{3} + 4x^{2} + 2x + 1}{(x + 1)^{2}}.\]
\[2)\ f(x) = \frac{2x^{3} + 3x^{2} + 1}{x - 1};\]
\[= \frac{4x^{3} - 3x^{2} - 6x - 1}{(x - 1)^{2}}.\]