, and
![\boxed{x}(x^2+2x+1)=x^3+2x^2+x](https://img.qammunity.org/2021/formulas/mathematics/high-school/2arjcu3fk0vlb5tquwarjz28gy28r1zmze.png)
Subtract this from
to get a remainder of
![x^3-(x^3+2x^2+x)=-2x^2-x](https://img.qammunity.org/2021/formulas/mathematics/high-school/xo881klkhsijluvhsls1ilxaqxezs0cda9.png)
, and
![\boxed{-2}(x^2+2x+1)=-2x^2-4x-2](https://img.qammunity.org/2021/formulas/mathematics/high-school/eh0vf441ynz9ri6k6r2rmym3b5y5llpm32.png)
Subtract this from the previous remainder to get a new remainder of
![(-2x^2-x)-(-2x^2-4x-2)=3x+2](https://img.qammunity.org/2021/formulas/mathematics/high-school/wlv52zax9rpffkq2npoai27bv70ket6t10.png)
does not divide
, so we stop here.
What we've done is to write
![(x^3)/(x^2+2x+1)=x-(2x^2+x)/(x^2+2x+1)](https://img.qammunity.org/2021/formulas/mathematics/high-school/gzpuus3v8ezk7d2um659z5gi64uhjcbcdm.png)
then
![(x^3)/(x^2+2x+1)=x-2+(3x+2)/(x^2+2x+1)](https://img.qammunity.org/2021/formulas/mathematics/high-school/v0iq9vbrfq2x45wpilcqsacdor3e5wmqgb.png)
and we stop here because the remainder term
has a degree less than the degree of the denominator.
Alternatively, we can be a bit tricky and notice that
![x^2+2x+1=(x+1)^2](https://img.qammunity.org/2021/formulas/mathematics/high-school/6xegpoeoepwhlocseari6nhydsisy34dg6.png)
Now,
![(x+1)^3=x^3+3x^2+3x+1](https://img.qammunity.org/2021/formulas/mathematics/high-school/12lb1360iy6n5swjuacoc3kpo5t69u1txn.png)
so that
![(x^3)/((x+1)^2)=((x+1)^3-(3x^2+3x+1))/((x+1)^2)](https://img.qammunity.org/2021/formulas/mathematics/high-school/nrx5xt2swq16i7hvu9mp910uvj94rekdz7.png)
We can divide the first term by
easily to get
![(x^3)/((x+1)^2)=x+1-(3x^2+3x+1)/((x+1)^2)](https://img.qammunity.org/2021/formulas/mathematics/high-school/xl5tc59zg05l7kkc31bx8evsvh2unpoqto.png)
Next,
![(x+1)^2=x^2+2x+1](https://img.qammunity.org/2021/formulas/mathematics/high-school/aiwbrxcrezqpre96hmdhb373luxf9s034b.png)
so that
![(x^3)/((x+1)^2)=x+1-(3((x+1)^2-(2x+1)))/((x+1)^2)-(3x+1)/((x+1)^2)](https://img.qammunity.org/2021/formulas/mathematics/high-school/zi3vp4i1rwprei003klqcbvjaigkj14wzh.png)
![(x^3)/((x+1)^2)=x+1-3+(6x+3)/((x+1)^2)-(3x+1)/((x+1)^2)](https://img.qammunity.org/2021/formulas/mathematics/high-school/txg62gxrpybkixsjd032c55b08l5rzbqwh.png)
![(x^3)/((x+1)^2)=x-2+(3x+2)/((x+1)^2)](https://img.qammunity.org/2021/formulas/mathematics/high-school/1itnjsp4zj2cy0ej11pwvgp9wfvatcvmbg.png)
which is the same result as before.