I have the answer, but don't know the procedure.

The question is:

Find the values of C and D if
c/(x-2) + D/(x+1) = 6x/(x^2-x-2)

The answers are: C= 4, D=2

HERE IS MY WORK:
Well, I know that we can add the left side and the denominators become the same. So, the new equations becomes:

c(x+1)+ D(x-2) = 6x

but, how do you go from here to find the values of c and d?

C/(x-2) + D/(x+1) = 6x/(x-2)(x+1)

Rewrite the terms on the left so that they have the same denominator as the term on the right.
C(x+1) + D(x-2)/[(x-2)(x+1)] =
6x/(x-2)(x+1)

Cx + C + Dx -2D = 6x

This can only be true if C+D= 6 and C-2D = 0
Solve those two equations to get C and D

This is called the method of partial fractions

To find the values of C and D, you can begin by expanding the equation:

c(x + 1) + D(x - 2) = 6x

Then, distribute the coefficients:

cx + c + Dx - 2D = 6x

Now, group the x terms and the constant terms together:

(cx + Dx) + (c - 2D) = 6x

Next, set the coefficients of x equal to each other:

c + D = 6

Similarly, set the constant terms equal to each other:

c - 2D = 0

Now, you have a system of two linear equations with two unknowns. To solve the system, you can use various methods such as substitution, elimination, or matrices.

Let's use the substitution method to find the values of C and D. Solve the second equation for c:

c = 2D

Substitute this expression for c in the first equation:

2D + D = 6

Combine like terms:

3D = 6

Divide both sides by 3:

D = 2

Now, substitute the value of D back into the equation c = 2D:

c = 2(2)

c = 4

Thus, the values of C and D are C = 4 and D = 2, respectively.