I got the wrong answer...

So posting again.....

Integrate
(cosx)/((2+sinx)(3-sinx)) dx

If I recall, my answer was (6/5)(ln(2+sinx) - ln(3-sinx) ) + c

When I differentiate that using Wolfram, I got
6 cosx/((2+sinx)(3-sinx)) <---- Wolfram expanded the denominator

so its 6 vs 6/5 , so we are apart by a factor of 1/5
I can't find my earlier reply due to Jiskha's non-functioning SEARCH
feature, perhaps you can after finding my post.

so try (1/5)(ln(2+sinx) - ln(3-sinx) ) + c

(cosx)/((2+sinx)(3-sinx)) = cosx/(6 + sinx - sin^2x)

Let u = 6 + sinx - sin^2x
du = cosx - 2sinx cosx
∫(cosx)/((2+sinx)(3-sinx)) dx = ∫du/u + ∫2sinx cosx/(6 + sinx - sin^2x)
now let v = sinx and
∫2sinx cosx/(6 + sinx - sin^2x) = ∫2v/((2+v)(3-v)) dv
Integrate that using partial fractions. You'll end up with some ln(z) functions.
Wolframalpha says that the integral is -2/5 tanh-1 (1-2sinx)/5
Recall that tanh-1(z) = 1/2 ln (1+z)/(1-z)

hmmm. mine looks overly complicated. Using partial fractions,

1/((2+u)(3-u)) = 1/5 (1/(u+2) - 1/(u-3))
so you now start with
1/5 ∫ cosx/(sinx+2) - cosx/(sinx-3) dx
and mathhelper's quick and easy solution falls right out.

To integrate the given function, cos(x)/((2+sin(x))(3-sin(x))), you can use a technique called partial fraction decomposition. This involves breaking down the function into simpler fractions and then integrating each part separately.

Here's how you can do it step by step:

Step 1: Factorize the denominator
To proceed with partial fraction decomposition, start by factoring the denominator. In this case, (2+sin(x))(3-sin(x)) cannot be simplified any further.

Step 2: Write out the partial fraction
The partial fraction decomposition for the given function is:

(cos(x))/((2+sin(x))(3-sin(x))) = A/(2+sin(x)) + B/(3-sin(x))

Step 3: Determine the values of A and B
To find the values of A and B, you can multiply both sides of the equation by the denominator:

cos(x) = A(3-sin(x)) + B(2+sin(x))

Next, simplify the equation:

cos(x) = (3A + 2B) + (B - A)sin(x)

Since the coefficients of sin(x) and cos(x) on both sides of the equation must be equal, we get two equations:

3A + 2B = 0 (equation for the constant terms)
B - A = 1 (equation for the coefficient of sin(x))

You can solve this system of equations to find A and B.

Step 4: Solve the system of equations
To solve the system of equations, you can use any method you prefer. In this case, you can multiply the second equation by 2 and add it to the first equation to eliminate A:

3A + 2B + 2B - 2A = 2

Simplifying the equation gives:

-A + 4B = 2

Now, multiply the second equation by 3 and subtract it from the first equation to eliminate B:

3A + 2B - 3B + A = 0

Simplifying the equation gives:

4A - B = 0

You now have a system of two equations:

-A + 4B = 2
4A - B = 0

Solving these equations simultaneously will yield the values of A and B.

Step 5: Integrate each term
Once you have determined the values of A and B, you can proceed to integrate each term separately:

∫(cos(x))/((2+sin(x))(3-sin(x))) dx = A∫dt/(2+t) + B∫dt/(3-t)

Using the substitution t = sin(x), dt = cos(x) dx, the integral becomes:

A∫dt/(2+t) + B∫dt/(3-t) = A ln|2 + t| + B ln|3 - t| + C

Finally, substituting back sin(x) for t, the solution becomes:

∫(cos(x))/((2+sin(x))(3-sin(x))) dx = A ln|2 + sin(x)| + B ln|3 - sin(x)| + C

where A and B are the values obtained from the system of equations, and C is the constant of integration.

Note: The exact values of A and B depend on the solution of the system of equations, which you will need to solve to obtain the specific values for these constants.