Problem to solve
Find the indefinite integral \[\int\frac{3\sec[x]-\cot[x]}{1-\csc[x]} dx\]
Solution
STEP 1
Take the integral:
 integral(3 sec(x) - cot(x))/(1 - csc(x)) dx
STEP 2
Multiply numerator and denominator of (3 sec(x) - cot(x))/(1 - csc(x)) by sin(x) (-cos^2(x)):
 = integral(cos^3(x) - 3 sin(x) cos(x))/(cos^2(x) - sin(x) cos^2(x)) dx
STEP 3
Prepare to substitute u = sin(x). Rewrite (cos^3(x) - 3 sin(x) cos(x))/(cos^2(x) - sin(x) cos^2(x)) using cos^2(x) = 1 - sin^2(x):
 = integral-((sin^2(x) + 3 sin(x) - 1) cos(x))/((sin(x) - 1)^2 (sin(x) + 1)) dx
STEP 4
For the integrand -((sin^2(x) + 3 sin(x) - 1) cos(x))/((sin(x) - 1)^2 (sin(x) + 1)), substitute u = sin(x) and du = cos(x) dx:
 = integral-(u^2 + 3 u - 1)/((u - 1)^2 (u + 1)) du
STEP 5
Factor out constants:
 = - integral(u^2 + 3 u - 1)/((u - 1)^2 (u + 1)) du
STEP 6
For the integrand (u^2 + 3 u - 1)/((u - 1)^2 (u + 1)), use partial fractions:
 = - integral-3/(4 (u + 1)) + 7/(4 (u - 1)) + 3/(2 (u - 1)^2) du
STEP 7
Integrate the sum term by term and factor out constants:
 = 3/4 integral1/(u + 1) du - 7/4 integral1/(u - 1) du - 3/2 integral1/(u - 1)^2 du
STEP 8
For the integrand 1/(u + 1), substitute s = u + 1 and ds = du:
 = 3/4 integral1/s ds - 7/4 integral1/(u - 1) du - 3/2 integral1/(u - 1)^2 du
STEP 9
The integral of 1/s is log(s):
 = (3 log(s))/4 - 7/4 integral1/(u - 1) du - 3/2 integral1/(u - 1)^2 du
STEP 10
For the integrand 1/(u - 1), substitute p = u - 1 and dp = du:
 = (3 log(s))/4 - 7/4 integral1/p dp - 3/2 integral1/(u - 1)^2 du
STEP 11
The integral of 1/p is log(p):
 = -(7 log(p))/4 + (3 log(s))/4 - 3/2 integral1/(u - 1)^2 du
STEP 12
For the integrand 1/(u - 1)^2, substitute w = u - 1 and dw = du:
 = -(7 log(p))/4 + (3 log(s))/4 - 3/2 integral1/w^2 dw
STEP 13
The integral of 1/w^2 is -1/w:
 = -(7 log(p))/4 + (3 log(s))/4 + 3/(2 w) + constant
STEP 14
Substitute back for w = u - 1:
 = 1/4 (-7 log(p) + 3 log(s) + 6/(u - 1)) + constant
STEP 15
Substitute back for p = u - 1:
 = 1/4 (3 log(s) + 6/(u - 1) - 7 log(u - 1)) + constant
STEP 16
Substitute back for s = u + 1:
 = 1/4 (6/(u - 1) - 7 log(u - 1) + 3 log(u + 1)) + constant
STEP 17
Substitute back for u = sin(x):
 = 1/4 (6/(sin(x) - 1) - 7 log(sin(x) - 1) + 3 log(sin(x) + 1)) + constant
STEP 18
Factor the answer a different way:
 = (-7 sin(x) log(sin(x) - 1) + 7 log(sin(x) - 1) - 3 log(sin(x) + 1) + 3 sin(x) log(sin(x) + 1) + 6)/(4 sin(x) - 4) + constant
STEP 19
Which is equivalent for restricted x values to:
Answer: | 
 | = (-7 sin(x) log(1 - sin(x)) + 7 log(1 - sin(x)) - 3 log(sin(x) + 1) + 3 sin(x) log(sin(x) + 1) + 6)/(4 sin(x) - 4) + constant
More problems
Number
001Find the indefinite integral \(\int\frac{x^2+2}{x^3+5x^2+2x-8} dx\)
002Find the indefinite integral \(\int\frac{4x^4-2}{x^3+4x^2+x-6} dx\)
003Find the indefinite integral \(\int\frac{4x^4-22x^3+11x^2-99x-34}{x^3-6x^2+4x-24} dx\)
004Find the indefinite integral \(\int\frac{3x^4+4x^2+5x}{(x-1)(x^2+1)^2} dx\)
005Find the indefinite integral \(\int\frac{x^6+6x^4+8x^2-4}{(x^2+4)(x^2+3)} dx\)
006Find the indefinite integral \(\int(-4x^4+6x^2+8x-1)\cos(x) dx\)
007Find the indefinite integral \(\int(-7x^5+2x^4-2)\cdot3^xdx\)
008Find the indefinite integral \(\int\arcsin^4(x) dx\)
009Find the indefinite integral \(\int\sin(\ln(x)) dx\)
010Find the indefinite integral \(\int(12x^{15}-3x^7-4x^3)\cdot e^{2x^4} dx\)
011Find the indefinite integral \(\int\frac{\sqrt{(3x^2+4)^3}}{x^4} dx\)
012Find the indefinite integral \(\int\frac{x^2}{\sqrt{2x^2-5}} dx\)
013Find the indefinite integral \(\int\frac{x^6}{\sqrt{(x^2+4)^3}} dx\)
014Find the indefinite integral \(\int x^2\sqrt{4-3x^2} dx\)
015Find the indefinite integral \(\int x^4\cdot\sqrt{x^2+4x+5} dx\)
016Find the indefinite integral \(\int\frac{\sqrt{x+2}}{x+1} dx\)
017Find the indefinite integral \(\int\frac{\sqrt{x+2}-4}{5-\sqrt{x+2}} dx\)
018Find the indefinite integral \(\int\frac{3\sqrt[3]{2x-1}-4}{\sqrt[6]{2x-1}-1} dx\)
019Find the indefinite integral \(\int\sqrt{\frac{x+3}{1-x}} dx\)
020Find the indefinite integral \(\int\frac{\sqrt[3]{x+1}-\sqrt{x+1}}{x} dx\)
021Find the indefinite integral \(\int\frac{\sin(x)-3\cos(x)}{\cos(x)-2} dx\)
022Find the indefinite integral \(\int\frac{3\sec(x)-\cot(x)}{1-\csc(x)} dx\)
023Find the indefinite integral \(\int\frac{\tan^2(x)+2}{\tan(x)+2} dx\)
024Find the indefinite integral \(\int\frac{3\sin^4(x)-2\cos^2(x)}{1+\sin^2(x)} dx\)
025Find the indefinite integral \(\int\tan^4(x)\sec^5(x) dx\)
Back