Problem to solve
Find the indefinite integral \[\int\frac{\sin[x]-3\cos[x]}{\cos[x]-2} dx\]
Solution
STEP 1
Take the integral:
 integral(sin(x) - 3 cos(x))/(cos(x) - 2) dx
STEP 2
For the integrand (sin(x) - 3 cos(x))/(cos(x) - 2), substitute u = tan(x/2) and du = 1/2 dx sec^2(x/2). Then transform the integrand using the substitutions sin(x) = (2 u)/(u^2 + 1), cos(x) = (1 - u^2)/(u^2 + 1) and dx = (2 du)/(u^2 + 1):
 = integral(2 ((2 u)/(u^2 + 1) - (3 (1 - u^2))/(u^2 + 1)))/((u^2 + 1) ((1 - u^2)/(u^2 + 1) - 2)) du
STEP 3
Simplify the integrand (2 ((2 u)/(u^2 + 1) - (3 (1 - u^2))/(u^2 + 1)))/((u^2 + 1) ((1 - u^2)/(u^2 + 1) - 2)) to get (-6 u^2 - 4 u + 6)/(3 u^4 + 4 u^2 + 1):
 = integral(-6 u^2 - 4 u + 6)/(3 u^4 + 4 u^2 + 1) du
STEP 4
For the integrand (-6 u^2 - 4 u + 6)/(3 u^4 + 4 u^2 + 1), use partial fractions:
 = integral(12 - 6 u)/(3 u^2 + 1) + (2 u - 6)/(u^2 + 1) du
STEP 5
Integrate the sum term by term:
 = integral(12 - 6 u)/(3 u^2 + 1) du + integral(2 u - 6)/(u^2 + 1) du
STEP 6
For the integrand (12 - 6 u)/(3 u^2 + 1), cancel common terms in the numerator and denominator:
 = integral-(6 (u - 2))/(3 u^2 + 1) du + integral(2 u - 6)/(u^2 + 1) du
STEP 7
Factor out constants:
 = -6 integral(u - 2)/(3 u^2 + 1) du + integral(2 u - 6)/(u^2 + 1) du
STEP 8
Expanding the integrand (u - 2)/(3 u^2 + 1) gives u/(3 u^2 + 1) - 2/(3 u^2 + 1):
 = -6 integral(u/(3 u^2 + 1) - 2/(3 u^2 + 1)) du + integral(2 u - 6)/(u^2 + 1) du
STEP 9
Integrate the sum term by term and factor out constants:
 = -6 integral u/(3 u^2 + 1) du + 12 integral1/(3 u^2 + 1) du + integral(2 u - 6)/(u^2 + 1) du
STEP 10
For the integrand u/(3 u^2 + 1), substitute s = 3 u^2 + 1 and ds = 6 u du:
 = - integral1/s ds + 12 integral1/(3 u^2 + 1) du + integral(2 u - 6)/(u^2 + 1) du
STEP 11
The integral of 1/s is log(s):
 = -log(s) + 12 integral1/(3 u^2 + 1) du + integral(2 u - 6)/(u^2 + 1) du
STEP 12
For the integrand 1/(3 u^2 + 1), substitute p = sqrt(3) u and dp = sqrt(3) du:
 = -log(s) + 4 sqrt(3) integral1/(p^2 + 1) dp + integral(2 u - 6)/(u^2 + 1) du
STEP 13
The integral of 1/(p^2 + 1) is tan^(-1)(p):
 = 4 sqrt(3) tan^(-1)(p) - log(s) + integral(2 u - 6)/(u^2 + 1) du
STEP 14
For the integrand (2 u - 6)/(u^2 + 1), cancel common terms in the numerator and denominator:
 = 4 sqrt(3) tan^(-1)(p) - log(s) + integral(2 (u - 3))/(u^2 + 1) du
STEP 15
Factor out constants:
 = 4 sqrt(3) tan^(-1)(p) - log(s) + 2 integral(u - 3)/(u^2 + 1) du
STEP 16
Expanding the integrand (u - 3)/(u^2 + 1) gives u/(u^2 + 1) - 3/(u^2 + 1):
 = 4 sqrt(3) tan^(-1)(p) - log(s) + 2 integral(u/(u^2 + 1) - 3/(u^2 + 1)) du
STEP 17
Integrate the sum term by term and factor out constants:
 = 4 sqrt(3) tan^(-1)(p) - log(s) + 2 integral u/(u^2 + 1) du - 6 integral1/(u^2 + 1) du
STEP 18
For the integrand u/(u^2 + 1), substitute w = u^2 + 1 and dw = 2 u du:
 = 4 sqrt(3) tan^(-1)(p) - log(s) + integral1/w dw - 6 integral1/(u^2 + 1) du
STEP 19
The integral of 1/w is log(w):
 = 4 sqrt(3) tan^(-1)(p) - log(s) + log(w) - 6 integral1/(u^2 + 1) du
STEP 20
The integral of 1/(u^2 + 1) is tan^(-1)(u):
 = 4 sqrt(3) tan^(-1)(p) - log(s) - 6 tan^(-1)(u) + log(w) + constant
STEP 21
Substitute back for w = u^2 + 1:
 = 4 sqrt(3) tan^(-1)(p) - log(s) + log(u^2 + 1) - 6 tan^(-1)(u) + constant
STEP 22
Substitute back for p = sqrt(3) u:
 = -log(s) + log(u^2 + 1) - 6 tan^(-1)(u) + 4 sqrt(3) tan^(-1)(sqrt(3) u) + constant
STEP 23
Substitute back for s = 3 u^2 + 1:
 = log(u^2 + 1) - log(3 u^2 + 1) - 6 tan^(-1)(u) + 4 sqrt(3) tan^(-1)(sqrt(3) u) + constant
STEP 24
Substitute back for u = tan(x/2):
 = -3 x + 4 sqrt(3) tan^(-1)(sqrt(3) tan(x/2)) - log(3 tan^2(x/2) + 1) + log(sec^2(x/2)) + constant
STEP 25
An alternative form of the integral is:
 = -3 x + 4 sqrt(3) tan^(-1)(sqrt(3) tan(x/2)) + log(1/(2 - cos(x))) + constant
STEP 26
Which is equivalent for restricted x values to:
Answer: | 
 | = -3 x + 4 sqrt(3) tan^(-1)(sqrt(3) tan(x/2)) - log(2 - cos(x)) + 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