Calculate: (7x+6+5x^2)/(x^2-2x+x^3)

Expression: $\frac{ 7x+6+5{x}^{2} }{ {x}^{2}-2x+{x}^{3} }$

Factor out $x$ from the expression

$\frac{ 7x+6+5{x}^{2} }{ x \times \left( x-2+{x}^{2} \right) }$

Use the commutative property to reorder the terms

$\frac{ 7x+6+5{x}^{2} }{ x \times \left( {x}^{2}+x-2 \right) }$

Write $x$ as a difference

$\frac{ 7x+6+5{x}^{2} }{ x \times \left( {x}^{2}+2x-x-2 \right) }$

Factor out $x$ from the expression

$\frac{ 7x+6+5{x}^{2} }{ x \times \left( x \times \left( x+2 \right)-x-2 \right) }$

Factor out the negative sign from the expression

$\frac{ 7x+6+5{x}^{2} }{ x \times \left( x \times \left( x+2 \right)-\left( x+2 \right) \right) }$

Factor out $x+2$ from the expression

$\frac{ 7x+6+5{x}^{2} }{ x \times \left( x+2 \right) \times \left( x-1 \right) }$

For each factor in the denominator, write a new fraction using the factors as new denominators. The numerators are unknown values

$\frac{ ? }{ x }+\frac{ ? }{ x+2 }+\frac{ ? }{ x-1 }$

Since the factor in the denominator is linear, the numerator is an unknown constant $A$

$\frac{ A }{ x }+\frac{ ? }{ x+2 }+\frac{ ? }{ x-1 }$

Since the factor in the denominator is linear, the numerator is an unknown constant $B$

$\frac{ A }{ x }+\frac{ B }{ x+2 }+\frac{ ? }{ x-1 }$

Since the factor in the denominator is linear, the numerator is an unknown constant $C$

$\frac{ A }{ x }+\frac{ B }{ x+2 }+\frac{ C }{ x-1 }$

To get the unknown values, set the sum of fractions equal to the original fraction

$\frac{ 7x+6+5{x}^{2} }{ x \times \left( x+2 \right) \times \left( x-1 \right) }=\frac{ A }{ x }+\frac{ B }{ x+2 }+\frac{ C }{ x-1 }$

Multiply both sides of the equation by $x \times \left( x+2 \right) \times \left( x-1 \right)$

$7x+6+5{x}^{2}=\left( x+2 \right) \times \left( x-1 \right)A+x \times \left( x-1 \right)B+x \times \left( x+2 \right)C$

Simplify the expression

$7x+6+5{x}^{2}=A{x}^{2}+Ax-2A+B{x}^{2}-Bx+C{x}^{2}+2Cx$

Use the commutative property to reorder the terms

$7x+6+5{x}^{2}=A{x}^{2}+B{x}^{2}+C{x}^{2}+Ax-Bx+2Cx-2A$

Group the powers of the $x$-terms and the constant terms

$7x+6+5{x}^{2}=\left( A+B+C \right){x}^{2}+\left( A-B+2C \right)x-2A$

When two polynomials are equal, their corresponding coefficients must be equal

$\left\{\begin{array} { l } 6=-2A \\ 7=A-B+2C \\ 5=A+B+C\end{array} \right.$

Solve the system of equations

$\left( A, B, C\right)=\left( -3, 2, 6\right)$

Substitute the given values into the formed partial-fraction decomposition

$\frac{ -3 }{ x }+\frac{ 2 }{ x+2 }+\frac{ 6 }{ x-1 }$

Use $\frac{ -a }{ b }=\frac{ a }{ -b }=-\frac{ a }{ b }$ to rewrite the fraction

$-\frac{ 3 }{ x }+\frac{ 2 }{ x+2 }+\frac{ 6 }{ x-1 }$