Express the integrals as the sum of partial fractions and evaluate the integral:

(integral of) (x^2)dx/(x-1)(x^2 +2x+1)

My work:
The above integral is equal to x^2dx/(x+1)^2
(A/x-1) + (B/x+1) + (Cx+D)/(x+1)^2 = x^2
A(x+1)^2 + B(x-1)(x+1) + (Cx+d)(x-1) = x^2
Ax^2 + 2Ax + A + Bx^2 + Cx^2 - Cx -D = x^2
x^2(A+B+C) + x(2A -C+D) + (A-B-D) = x^2
Which gives us the following equations:
A+B+C = 1
2A-C+d= 0
A-B-D=0
The problem is once I get to this point, I get stuck. I'm not sure how to solve for A,B,C, and D.

You do not really have a problem.

There are two ways to do a partial fraction with multiple factors in the denominator, and you have combined the two.

For the multiple factor of (x+1)², you could either assume
B/(x+1)+D/(x+1)² or
(Cx+D)/(x+1)²

In your particular problem, this is the equivalent of setting C=0, and proceed to solve for A,B and D with the three equations that you have correctly set up.

To solve for A, B, C, and D, you need to continue manipulating the equations you have derived. In this case, you have a system of linear equations. To solve this system, you can use various methods such as substitution or elimination. Here is one way to solve it using the method of substitution:

From the first equation A + B + C = 1, you can solve for A in terms of B and C by rearranging the equation:
A = 1 - B - C

Next, substitute this expression for A into the second equation 2A - C + D = 0:
2(1 - B - C) - C + D = 0
2 - 2B - 2C - C + D = 0
-3B - 3C + D = -2

Now, substitute the expressions for A and D into the third equation A - B - D = 0:
(1 - B - C) - B - D = 0
1 - 2B - C - D = 0
-2B - C - D = -1

You now have a system of three equations with three unknowns:

-3B - 3C + D = -2
-2B - C - D = -1
A + B + C = 1

From here, you can use any preferred method to solve for B, C, and D. One common approach is to solve one equation for one variable and substitute that expression into the other equations, gradually reducing the system to only one variable. Then, you can solve for each variable individually.

Once you have obtained the values of A, B, C, and D, you can express the integrand as partial fractions and integrate it.