To integrate the given expression, (((cos^2(x)*sin(x)/(1-sin(x)))-sin(x))dx), we can simplify it first and then use basic integration techniques.
Step 1: Simplify the expression
Let's simplify the expression (((cos^2(x)*sin(x)/(1-sin(x)))-sin(x))dx) to make it easier to integrate.
Using algebraic manipulation, we can simplify the expression as follows:
cos^2(x)*sin(x)/(1-sin(x)) - sin(x)
= (cos^2(x)*sin(x) - sin(x)*(1 - sin(x))) / (1 - sin(x))
= (cos^2(x)*sin(x) - sin(x) + sin^2(x)*sin(x)) / (1 - sin(x))
= (cos^2(x)*sin(x) + sin^3(x) - sin(x)) / (1 - sin(x))
Step 2: Integration
Now that we have simplified the expression, let's integrate it. We can split the expression into separate terms and integrate each term separately.
Term 1: Integrate cos^2(x)*sin(x) / (1 - sin(x))
To integrate this term, we can use a substitution. Let's assume u = 1 - sin(x), then du = -cos(x) dx.
Now the integral becomes:
∫ (cos^2(x)*sin(x) / (1 - sin(x))) dx = -∫ (cos^2(x) / u) du
= -∫ (1 - u) / u du
= -∫ (1/u) - 1 du
= -ln|u| - u + C
= -ln|1 - sin(x)| - (1 - sin(x)) + C
Term 2: Integrate sin^3(x) / (1 - sin(x))
For this term, we can use another substitution. Let's assume v = 1 - sin(x), then dv = -cos(x) dx.
Now the integral becomes:
∫ (sin^3(x) / (1 - sin(x))) dx = -∫ (1 - v)^3 / v dv
= -∫ (1 - 3v + 3v^2 - v^3) / v dv
= -∫ (1/v - 3 + 3v - v^2) dv
= -ln|v| - 3v + (3/2)v^2 - (1/3)v^3 + C
= -ln|1 - sin(x)| - 3(1 - sin(x)) + (3/2)(1 - sin(x))^2 - (1/3)(1 - sin(x))^3 + C
Term 3: Integrate -sin(x)
This term is simple to integrate:
∫ -sin(x) dx = cos(x) + C
Step 3: Putting it all together
To find the result of the integration of the original expression, we need to sum up the integrals of each term:
∫ (((cos^2(x)*sin(x)/(1-sin(x)))-sin(x))dx)
= -ln|1 - sin(x)| - (1 - sin(x)) + (3/2)(1 - sin(x))^2 - (1/3)(1 - sin(x))^3 - sin(x) + C
Therefore, the integral of the given expression is:
-ln|1 - sin(x)| - (1 - sin(x)) + (3/2)(1 - sin(x))^2 - (1/3)(1 - sin(x))^3 - sin(x) + C