In our previous discussion of trigonometric integrals, the trigonometric functions appeared primarily in the numerator as integer powers.
A distinctly different challenge arises when trigonometric expressions appear in the denominator , accompanied by constant terms:
∫ d x a + b cos x , ∫ d x a cos x + b sin x + c , ∫ d x a + b cos 2 x \int \frac{dx}{a + b\cos x}, \qquad \int \frac{dx}{a\cos x + b\sin x + c}, \qquad \int \frac{dx}{a + b\cos^2 x} ∫ a + b cos x d x , ∫ a cos x + b sin x + c d x , ∫ a + b cos 2 x d x
Because addition in denominators cannot be split directly, standard algebra fails. Instead, each family of denominators possesses a tailored algebraic bridge that converts the trigonometric function into a polynomial fraction.
In this tutorial, we establish the five fundamental families of linear and quadratic trigonometric denominators.
Pure Linear Combinations via the Auxiliary Angle§
We begin with the linear combination without a constant term:
∫ d x a cos x + b sin x \int \frac{dx}{a\cos x + b\sin x} ∫ a cos x + b sin x d x
The Method§
Any linear combination a cos x + b sin x a\cos x + b\sin x a cos x + b sin x can be compressed into a single cosine term by introducing an auxiliary angle α \alpha α :
a cos x + b sin x = r ( a r cos x + b r sin x ) = r cos ( x − α ) a\cos x + b\sin x = r\left(\frac{a}{r}\cos x + \frac{b}{r}\sin x\right) = r\cos(x - \alpha) a cos x + b sin x = r ( r a cos x + r b sin x ) = r cos ( x − α )
where:
r = a 2 + b 2 , cos α = a a 2 + b 2 , sin α = b a 2 + b 2 ⟹ tan α = b a r = \sqrt{a^2 + b^2}, \qquad \cos\alpha = \frac{a}{\sqrt{a^2 + b^2}}, \qquad \sin\alpha = \frac{b}{\sqrt{a^2 + b^2}} \implies \tan\alpha = \frac{b}{a} r = a 2 + b 2 , cos α = a 2 + b 2 a , sin α = a 2 + b 2 b ⟹ tan α = a b
Under this transformation, the integral becomes:
∫ d x a cos x + b sin x = 1 r ∫ d x cos ( x − α ) = 1 r ∫ sec ( x − α ) d x \int \frac{dx}{a\cos x + b\sin x} = \frac{1}{r}\int \frac{dx}{\cos(x - \alpha)} = \frac{1}{r}\int \sec(x - \alpha)\,dx ∫ a cos x + b sin x d x = r 1 ∫ cos ( x − α ) d x = r 1 ∫ sec ( x − α ) d x
Using the standard antiderivative of secant:
1 r ln ∣ sec ( x − α ) + tan ( x − α ) ∣ + C \frac{1}{r}\ln|\sec(x - \alpha) + \tan(x - \alpha)| + C r 1 ln ∣ sec ( x − α ) + tan ( x − α ) ∣ + C
Example 1§
Evaluate:
I = ∫ d x cos x + 3 sin x I = \int \frac{dx}{\cos x + \sqrt{3}\sin x} I = ∫ cos x + 3 sin x d x
Solution:
Here a = 1 a = 1 a = 1 and b = 3 b = \sqrt{3} b = 3 .
Compute the amplitude r r r :
r = 1 2 + ( 3 ) 2 = 1 + 3 = 2 r = \sqrt{1^2 + (\sqrt{3})^2} = \sqrt{1 + 3} = 2 r = 1 2 + ( 3 ) 2 = 1 + 3 = 2
Divide and multiply by 2 2 2 :
cos x + 3 sin x = 2 ( 1 2 cos x + 3 2 sin x ) = 2 ( cos x cos π 3 + sin x sin π 3 ) = 2 cos ( x − π 3 ) \cos x + \sqrt{3}\sin x = 2\left( \frac{1}{2}\cos x + \frac{\sqrt{3}}{2}\sin x \right) = 2\left( \cos x \cos\frac{\pi}{3} + \sin x \sin\frac{\pi}{3} \right) = 2\cos\left(x - \frac{\pi}{3}\right) cos x + 3 sin x = 2 ( 2 1 cos x + 2 3 sin x ) = 2 ( cos x cos 3 π + sin x sin 3 π ) = 2 cos ( x − 3 π )
Substitute into the integral:
I = 1 2 ∫ d x cos ( x − π 3 ) = 1 2 ∫ sec ( x − π 3 ) d x I = \frac{1}{2}\int \frac{dx}{\cos\left(x - \frac{\pi}{3}\right)} = \frac{1}{2}\int \sec\left(x - \frac{\pi}{3}\right)dx I = 2 1 ∫ cos ( x − 3 π ) d x = 2 1 ∫ sec ( x − 3 π ) d x
Integrating:
I = 1 2 ln ∣ sec ( x − π 3 ) + tan ( x − π 3 ) ∣ + C I = \frac{1}{2}\ln\left| \sec\left(x - \frac{\pi}{3}\right) + \tan\left(x - \frac{\pi}{3}\right) \right| + C I = 2 1 ln sec ( x − 3 π ) + tan ( x − 3 π ) + C
Example 2§
Evaluate:
I = ∫ d x 3 cos x + 4 sin x I = \int \frac{dx}{3\cos x + 4\sin x} I = ∫ 3 cos x + 4 sin x d x
Solution:
Here a = 3 a = 3 a = 3 and b = 4 b = 4 b = 4 .
Compute r r r :
r = 3 2 + 4 2 = 5 r = \sqrt{3^2 + 4^2} = 5 r = 3 2 + 4 2 = 5
Express the denominator as:
3 cos x + 4 sin x = 5 cos ( x − α ) where tan α = 4 3 3\cos x + 4\sin x = 5\cos(x - \alpha) \qquad \text{where } \tan\alpha = \frac{4}{3} 3 cos x + 4 sin x = 5 cos ( x − α ) where tan α = 3 4
The integral becomes:
I = 1 5 ∫ sec ( x − α ) d x = 1 5 ln ∣ sec ( x − α ) + tan ( x − α ) ∣ + C I = \frac{1}{5}\int \sec(x - \alpha)\,dx = \frac{1}{5}\ln|\sec(x - \alpha) + \tan(x - \alpha)| + C I = 5 1 ∫ sec ( x − α ) d x = 5 1 ln ∣ sec ( x − α ) + tan ( x − α ) ∣ + C
Linear Denominators with Constants: The Weierstrass Substitution§
When the denominator contains a constant term:
∫ d x a + b cos x , ∫ d x a + b sin x , ∫ d x a cos x + b sin x + c \int \frac{dx}{a + b\cos x}, \qquad \int \frac{dx}{a + b\sin x}, \qquad \int \frac{dx}{a\cos x + b\sin x + c} ∫ a + b cos x d x , ∫ a + b sin x d x , ∫ a cos x + b sin x + c d x
the auxiliary angle method no longer applies because the constant prevents factoring out r r r .
The universal remedy is the Weierstrass Half-Angle Substitution .
The Half-Angle Dictionary§
Let:
t = tan ( x 2 ) t = \tan\left(\frac{x}{2}\right) t = tan ( 2 x )
From trigonometry, we express sin x \sin x sin x and cos x \cos x cos x as rational functions of t t t :
cos x = 1 − tan 2 ( x / 2 ) 1 + tan 2 ( x / 2 ) = 1 − t 2 1 + t 2 \cos x = \frac{1 - \tan^2(x/2)}{1 + \tan^2(x/2)} = \frac{1 - t^2}{1 + t^2} cos x = 1 + tan 2 ( x /2 ) 1 − tan 2 ( x /2 ) = 1 + t 2 1 − t 2
sin x = 2 tan ( x / 2 ) 1 + tan 2 ( x / 2 ) = 2 t 1 + t 2 \sin x = \frac{2\tan(x/2)}{1 + \tan^2(x/2)} = \frac{2t}{1 + t^2} sin x = 1 + tan 2 ( x /2 ) 2 tan ( x /2 ) = 1 + t 2 2 t
To find the differential d x dx d x :
x = 2 tan − 1 t ⟹ d x = 2 d t 1 + t 2 x = 2\tan^{-1} t \implies dx = \frac{2\,dt}{1 + t^2} x = 2 tan − 1 t ⟹ d x = 1 + t 2 2 d t
Substituting these three relations into ∫ d x a cos x + b sin x + c \int \frac{dx}{a\cos x + b\sin x + c} ∫ a c o s x + b s i n x + c d x :
∫ 2 d t 1 + t 2 a ( 1 − t 2 1 + t 2 ) + b ( 2 t 1 + t 2 ) + c = ∫ 2 d t a ( 1 − t 2 ) + 2 b t + c ( 1 + t 2 ) \int \frac{\frac{2\,dt}{1 + t^2}}{a\left(\frac{1 - t^2}{1 + t^2}\right) + b\left(\frac{2t}{1 + t^2}\right) + c} = \int \frac{2\,dt}{a(1 - t^2) + 2bt + c(1 + t^2)} ∫ a ( 1 + t 2 1 − t 2 ) + b ( 1 + t 2 2 t ) + c 1 + t 2 2 d t = ∫ a ( 1 − t 2 ) + 2 b t + c ( 1 + t 2 ) 2 d t
Collecting powers of t t t :
∫ 2 d t ( c − a ) t 2 + 2 b t + ( c + a ) \int \frac{2\,dt}{(c - a)t^2 + 2bt + (c + a)} ∫ ( c − a ) t 2 + 2 b t + ( c + a ) 2 d t
This is an ordinary rational quadratic in t t t , which is evaluated by completing the square using our standard quadratic formulas.
Example 3§
Evaluate:
I = ∫ d x 5 + 4 cos x I = \int \frac{dx}{5 + 4\cos x} I = ∫ 5 + 4 cos x d x
Solution:
Substitute t = tan ( x / 2 ) t = \tan(x/2) t = tan ( x /2 ) :
d x = 2 d t 1 + t 2 , cos x = 1 − t 2 1 + t 2 dx = \frac{2\,dt}{1 + t^2}, \qquad \cos x = \frac{1 - t^2}{1 + t^2} d x = 1 + t 2 2 d t , cos x = 1 + t 2 1 − t 2
The denominator simplifies to:
5 + 4 ( 1 − t 2 1 + t 2 ) = 5 ( 1 + t 2 ) + 4 ( 1 − t 2 ) 1 + t 2 = t 2 + 9 1 + t 2 5 + 4\left(\frac{1 - t^2}{1 + t^2}\right) = \frac{5(1 + t^2) + 4(1 - t^2)}{1 + t^2} = \frac{t^2 + 9}{1 + t^2} 5 + 4 ( 1 + t 2 1 − t 2 ) = 1 + t 2 5 ( 1 + t 2 ) + 4 ( 1 − t 2 ) = 1 + t 2 t 2 + 9
Substitute into the integral:
I = ∫ 2 d t 1 + t 2 t 2 + 9 1 + t 2 = ∫ 2 d t t 2 + 9 = 2 ∫ d t t 2 + 3 2 I = \int \frac{\frac{2\,dt}{1 + t^2}}{\frac{t^2 + 9}{1 + t^2}} = \int \frac{2\,dt}{t^2 + 9} = 2\int \frac{dt}{t^2 + 3^2} I = ∫ 1 + t 2 t 2 + 9 1 + t 2 2 d t = ∫ t 2 + 9 2 d t = 2 ∫ t 2 + 3 2 d t
Using the standard arctangent formula:
I = 2 ⋅ 1 3 tan − 1 ( t 3 ) + C = 2 3 tan − 1 ( 1 3 tan ( x 2 ) ) + C I = 2 \cdot \frac{1}{3}\tan^{-1}\left(\frac{t}{3}\right) + C = \frac{2}{3}\tan^{-1}\left( \frac{1}{3}\tan\left(\frac{x}{2}\right) \right) + C I = 2 ⋅ 3 1 tan − 1 ( 3 t ) + C = 3 2 tan − 1 ( 3 1 tan ( 2 x ) ) + C
Example 4§
Evaluate:
I = ∫ d x 3 + 5 cos x I = \int \frac{dx}{3 + 5\cos x} I = ∫ 3 + 5 cos x d x
Solution:
Apply the Weierstrass substitution t = tan ( x / 2 ) t = \tan(x/2) t = tan ( x /2 ) :
d x = 2 d t 1 + t 2 , cos x = 1 − t 2 1 + t 2 dx = \frac{2\,dt}{1 + t^2}, \qquad \cos x = \frac{1 - t^2}{1 + t^2} d x = 1 + t 2 2 d t , cos x = 1 + t 2 1 − t 2
Transform the denominator:
3 + 5 ( 1 − t 2 1 + t 2 ) = 3 ( 1 + t 2 ) + 5 ( 1 − t 2 ) 1 + t 2 = 8 − 2 t 2 1 + t 2 = 2 ( 4 − t 2 ) 1 + t 2 3 + 5\left(\frac{1 - t^2}{1 + t^2}\right) = \frac{3(1 + t^2) + 5(1 - t^2)}{1 + t^2} = \frac{8 - 2t^2}{1 + t^2} = \frac{2(4 - t^2)}{1 + t^2} 3 + 5 ( 1 + t 2 1 − t 2 ) = 1 + t 2 3 ( 1 + t 2 ) + 5 ( 1 − t 2 ) = 1 + t 2 8 − 2 t 2 = 1 + t 2 2 ( 4 − t 2 )
Substitute into the integral:
I = ∫ 2 d t 1 + t 2 2 ( 4 − t 2 ) 1 + t 2 = ∫ d t 4 − t 2 = ∫ d t 2 2 − t 2 I = \int \frac{\frac{2\,dt}{1 + t^2}}{\frac{2(4 - t^2)}{1 + t^2}} = \int \frac{dt}{4 - t^2} = \int \frac{dt}{2^2 - t^2} I = ∫ 1 + t 2 2 ( 4 − t 2 ) 1 + t 2 2 d t = ∫ 4 − t 2 d t = ∫ 2 2 − t 2 d t
Using the standard difference-of-squares formula:
I = 1 2 ( 2 ) ln ∣ 2 + t 2 − t ∣ + C = 1 4 ln ∣ 2 + tan ( x / 2 ) 2 − tan ( x / 2 ) ∣ + C I = \frac{1}{2(2)}\ln\left| \frac{2 + t}{2 - t} \right| + C = \frac{1}{4}\ln\left| \frac{2 + \tan(x/2)}{2 - \tan(x/2)} \right| + C I = 2 ( 2 ) 1 ln 2 − t 2 + t + C = 4 1 ln 2 − tan ( x /2 ) 2 + tan ( x /2 ) + C
Notice the contrast with Example 3: when the constant term exceeds the cosine coefficient (5 > 4 5 > 4 5 > 4 ), the quadratic denominator has complex roots and yields an arctangent. When the cosine coefficient exceeds the constant (5 > 3 5 > 3 5 > 3 ), the quadratic denominator factors into real roots and yields a logarithm.
Example 5§
Evaluate:
I = ∫ d x 1 + sin x + cos x I = \int \frac{dx}{1 + \sin x + \cos x} I = ∫ 1 + sin x + cos x d x
Solution:
Substitute t = tan ( x / 2 ) t = \tan(x/2) t = tan ( x /2 ) :
d x = 2 d t 1 + t 2 , sin x = 2 t 1 + t 2 , cos x = 1 − t 2 1 + t 2 dx = \frac{2\,dt}{1 + t^2}, \qquad \sin x = \frac{2t}{1 + t^2}, \qquad \cos x = \frac{1 - t^2}{1 + t^2} d x = 1 + t 2 2 d t , sin x = 1 + t 2 2 t , cos x = 1 + t 2 1 − t 2
Combine the terms in the denominator:
1 + sin x + cos x = ( 1 + t 2 ) + 2 t + ( 1 − t 2 ) 1 + t 2 = 2 + 2 t 1 + t 2 = 2 ( 1 + t ) 1 + t 2 1 + \sin x + \cos x = \frac{(1 + t^2) + 2t + (1 - t^2)}{1 + t^2} = \frac{2 + 2t}{1 + t^2} = \frac{2(1 + t)}{1 + t^2} 1 + sin x + cos x = 1 + t 2 ( 1 + t 2 ) + 2 t + ( 1 − t 2 ) = 1 + t 2 2 + 2 t = 1 + t 2 2 ( 1 + t )
Substitute into the integral:
I = ∫ 2 d t 1 + t 2 2 ( 1 + t ) 1 + t 2 = ∫ d t 1 + t = ln ∣ 1 + t ∣ + C I = \int \frac{\frac{2\,dt}{1 + t^2}}{\frac{2(1 + t)}{1 + t^2}} = \int \frac{dt}{1 + t} = \ln|1 + t| + C I = ∫ 1 + t 2 2 ( 1 + t ) 1 + t 2 2 d t = ∫ 1 + t d t = ln ∣1 + t ∣ + C
Returning to x x x :
I = ln ∣ 1 + tan ( x 2 ) ∣ + C I = \ln\left| 1 + \tan\left(\frac{x}{2}\right) \right| + C I = ln 1 + tan ( 2 x ) + C
Example 6§
Evaluate:
I = ∫ d x 2 + sin x I = \int \frac{dx}{2 + \sin x} I = ∫ 2 + sin x d x
Solution:
Substitute t = tan ( x / 2 ) t = \tan(x/2) t = tan ( x /2 ) :
2 + sin x = 2 + 2 t 1 + t 2 = 2 ( 1 + t 2 ) + 2 t 1 + t 2 = 2 ( t 2 + t + 1 ) 1 + t 2 2 + \sin x = 2 + \frac{2t}{1 + t^2} = \frac{2(1 + t^2) + 2t}{1 + t^2} = \frac{2(t^2 + t + 1)}{1 + t^2} 2 + sin x = 2 + 1 + t 2 2 t = 1 + t 2 2 ( 1 + t 2 ) + 2 t = 1 + t 2 2 ( t 2 + t + 1 )
Substitute into the integral:
I = ∫ 2 d t 1 + t 2 2 ( t 2 + t + 1 ) 1 + t 2 = ∫ d t t 2 + t + 1 I = \int \frac{\frac{2\,dt}{1 + t^2}}{\frac{2(t^2 + t + 1)}{1 + t^2}} = \int \frac{dt}{t^2 + t + 1} I = ∫ 1 + t 2 2 ( t 2 + t + 1 ) 1 + t 2 2 d t = ∫ t 2 + t + 1 d t
Complete the square in the quadratic denominator:
t 2 + t + 1 = ( t + 1 2 ) 2 + 3 4 = ( t + 1 2 ) 2 + ( 3 2 ) 2 t^2 + t + 1 = \left(t + \frac{1}{2}\right)^2 + \frac{3}{4} = \left(t + \frac{1}{2}\right)^2 + \left(\frac{\sqrt{3}}{2}\right)^2 t 2 + t + 1 = ( t + 2 1 ) 2 + 4 3 = ( t + 2 1 ) 2 + ( 2 3 ) 2
Using the arctangent formula:
I = 1 3 / 2 tan − 1 ( t + 1 / 2 3 / 2 ) + C = 2 3 tan − 1 ( 2 t + 1 3 ) + C I = \frac{1}{\sqrt{3}/2}\tan^{-1}\left( \frac{t + 1/2}{\sqrt{3}/2} \right) + C = \frac{2}{\sqrt{3}}\tan^{-1}\left( \frac{2t + 1}{\sqrt{3}} \right) + C I = 3 /2 1 tan − 1 ( 3 /2 t + 1/2 ) + C = 3 2 tan − 1 ( 3 2 t + 1 ) + C
Substitute t = tan ( x / 2 ) t = \tan(x/2) t = tan ( x /2 ) :
I = 2 3 tan − 1 ( 2 tan ( x / 2 ) + 1 3 ) + C I = \frac{2}{\sqrt{3}}\tan^{-1}\left( \frac{2\tan(x/2) + 1}{\sqrt{3}} \right) + C I = 3 2 tan − 1 ( 3 2 tan ( x /2 ) + 1 ) + C
Example 7§
Evaluate:
I = ∫ d x 1 + cos x I = \int \frac{dx}{1 + \cos x} I = ∫ 1 + cos x d x
Solution:
While the Weierstrass substitution works, applying half-angle identities directly avoids intermediate rational fractions.
Recall:
1 + cos x = 2 cos 2 ( x 2 ) 1 + \cos x = 2\cos^2\left(\frac{x}{2}\right) 1 + cos x = 2 cos 2 ( 2 x )
Substitute directly into the integral:
I = ∫ d x 2 cos 2 ( x / 2 ) = 1 2 ∫ sec 2 ( x 2 ) d x = 1 2 ⋅ tan ( x / 2 ) 1 / 2 + C = tan ( x 2 ) + C I = \int \frac{dx}{2\cos^2(x/2)} = \frac{1}{2}\int \sec^2\left(\frac{x}{2}\right)dx = \frac{1}{2} \cdot \frac{\tan(x/2)}{1/2} + C = \tan\left(\frac{x}{2}\right) + C I = ∫ 2 cos 2 ( x /2 ) d x = 2 1 ∫ sec 2 ( 2 x ) d x = 2 1 ⋅ 1/2 tan ( x /2 ) + C = tan ( 2 x ) + C
Linear Numerator Over Linear Denominator§
When linear trigonometric expressions appear in both the numerator and the denominator:
∫ p cos x + q sin x a cos x + b sin x d x or ∫ p cos x + q sin x + r a cos x + b sin x + c d x \int \frac{p\cos x + q\sin x}{a\cos x + b\sin x}\,dx \qquad \text{or} \qquad \int \frac{p\cos x + q\sin x + r}{a\cos x + b\sin x + c}\,dx ∫ a cos x + b sin x p cos x + q sin x d x or ∫ a cos x + b sin x + c p cos x + q sin x + r d x
the standard strategy is to express the numerator as a linear combination of the denominator and its derivative.
The Algebraic Decomposition§
Write:
Numerator = A ( Denominator ) + B ( d d x ( Denominator ) ) + C \text{Numerator} = A(\text{Denominator}) + B\left(\frac{d}{dx}(\text{Denominator})\right) + C Numerator = A ( Denominator ) + B ( d x d ( Denominator ) ) + C
Equating coefficients of sin x \sin x sin x , cos x \cos x cos x , and the constant term produces a system of linear equations for the constants A A A , B B B , and C C C .
Substituting this decomposition into the integral splits it into three simple parts:
I = A ∫ 1 d x + B ∫ Denominator ′ Denominator d x + C ∫ d x Denominator I = A \int 1\,dx + B \int \frac{\text{Denominator}'}{\text{Denominator}}\,dx + C \int \frac{dx}{\text{Denominator}} I = A ∫ 1 d x + B ∫ Denominator Denominator ′ d x + C ∫ Denominator d x
I = A x + B ln ∣ Denominator ∣ + C ∫ d x Denominator I = Ax + B\ln|\text{Denominator}| + C \int \frac{dx}{\text{Denominator}} I = A x + B ln ∣ Denominator ∣ + C ∫ Denominator d x
The third integral is evaluated using the Weierstrass half-angle substitution.
Example 8§
Evaluate:
I = ∫ 3 sin x + 2 cos x 2 sin x + 3 cos x d x I = \int \frac{3\sin x + 2\cos x}{2\sin x + 3\cos x}\,dx I = ∫ 2 sin x + 3 cos x 3 sin x + 2 cos x d x
Solution:
Set up the decomposition without a constant (since no constant appears in the integrand):
Numerator = A ( Denominator ) + B ( d d x ( Denominator ) ) \text{Numerator} = A(\text{Denominator}) + B\left(\frac{d}{dx}(\text{Denominator})\right) Numerator = A ( Denominator ) + B ( d x d ( Denominator ) )
Compute the derivative of the denominator:
d d x ( 2 sin x + 3 cos x ) = 2 cos x − 3 sin x \frac{d}{dx}(2\sin x + 3\cos x) = 2\cos x - 3\sin x d x d ( 2 sin x + 3 cos x ) = 2 cos x − 3 sin x
Write the identity:
3 sin x + 2 cos x = A ( 2 sin x + 3 cos x ) + B ( 2 cos x − 3 sin x ) 3\sin x + 2\cos x = A(2\sin x + 3\cos x) + B(2\cos x - 3\sin x) 3 sin x + 2 cos x = A ( 2 sin x + 3 cos x ) + B ( 2 cos x − 3 sin x )
3 sin x + 2 cos x = ( 2 A − 3 B ) sin x + ( 3 A + 2 B ) cos x 3\sin x + 2\cos x = (2A - 3B)\sin x + (3A + 2B)\cos x 3 sin x + 2 cos x = ( 2 A − 3 B ) sin x + ( 3 A + 2 B ) cos x
Equate corresponding coefficients:
2 A − 3 B = 3 2A - 3B = 3 2 A − 3 B = 3
3 A + 2 B = 2 3A + 2B = 2 3 A + 2 B = 2
Multiply the first equation by 2 2 2 and the second by 3 3 3 :
4 A − 6 B = 6 4A - 6B = 6 4 A − 6 B = 6
9 A + 6 B = 6 9A + 6B = 6 9 A + 6 B = 6
Adding both equations:
13 A = 12 ⟹ A = 12 13 13A = 12 \implies A = \frac{12}{13} 13 A = 12 ⟹ A = 13 12
Substitute into the first equation:
2 ( 12 13 ) − 3 B = 3 ⟹ 3 B = 24 13 − 3 = − 15 13 ⟹ B = − 5 13 2\left(\frac{12}{13}\right) - 3B = 3 \implies 3B = \frac{24}{13} - 3 = -\frac{15}{13} \implies B = -\frac{5}{13} 2 ( 13 12 ) − 3 B = 3 ⟹ 3 B = 13 24 − 3 = − 13 15 ⟹ B = − 13 5
Now split the integral:
I = 12 13 ∫ 1 d x − 5 13 ∫ 2 cos x − 3 sin x 2 sin x + 3 cos x d x I = \frac{12}{13}\int 1\,dx - \frac{5}{13}\int \frac{2\cos x - 3\sin x}{2\sin x + 3\cos x}\,dx I = 13 12 ∫ 1 d x − 13 5 ∫ 2 sin x + 3 cos x 2 cos x − 3 sin x d x
I = 12 13 x − 5 13 ln ∣ 2 sin x + 3 cos x ∣ + C I = \frac{12}{13}x - \frac{5}{13}\ln|2\sin x + 3\cos x| + C I = 13 12 x − 13 5 ln ∣2 sin x + 3 cos x ∣ + C
Example 9§
Evaluate:
I = ∫ 2 sin x + cos x + 3 sin x + 2 cos x + 1 d x I = \int \frac{2\sin x + \cos x + 3}{\sin x + 2\cos x + 1}\,dx I = ∫ sin x + 2 cos x + 1 2 sin x + cos x + 3 d x
Solution:
Set up the decomposition:
Numerator = A ( Denominator ) + B ( d d x ( Denominator ) ) + C \text{Numerator} = A(\text{Denominator}) + B\left(\frac{d}{dx}(\text{Denominator})\right) + C Numerator = A ( Denominator ) + B ( d x d ( Denominator ) ) + C
2 sin x + cos x + 3 = A ( sin x + 2 cos x + 1 ) + B ( cos x − 2 sin x ) + C 2\sin x + \cos x + 3 = A(\sin x + 2\cos x + 1) + B(\cos x - 2\sin x) + C 2 sin x + cos x + 3 = A ( sin x + 2 cos x + 1 ) + B ( cos x − 2 sin x ) + C
Collect like terms:
2 sin x + cos x + 3 = ( A − 2 B ) sin x + ( 2 A + B ) cos x + ( A + C ) 2\sin x + \cos x + 3 = (A - 2B)\sin x + (2A + B)\cos x + (A + C) 2 sin x + cos x + 3 = ( A − 2 B ) sin x + ( 2 A + B ) cos x + ( A + C )
Equate coefficients:
A − 2 B = 2 A - 2B = 2 A − 2 B = 2
2 A + B = 1 2A + B = 1 2 A + B = 1
A + C = 3 A + C = 3 A + C = 3
From the second equation, B = 1 − 2 A B = 1 - 2A B = 1 − 2 A . Substitute into the first:
A − 2 ( 1 − 2 A ) = 2 ⟹ 5 A − 2 = 2 ⟹ 5 A = 4 ⟹ A = 4 5 A - 2(1 - 2A) = 2 \implies 5A - 2 = 2 \implies 5A = 4 \implies A = \frac{4}{5} A − 2 ( 1 − 2 A ) = 2 ⟹ 5 A − 2 = 2 ⟹ 5 A = 4 ⟹ A = 5 4
B = 1 − 2 ( 4 5 ) = − 3 5 B = 1 - 2\left(\frac{4}{5}\right) = -\frac{3}{5} B = 1 − 2 ( 5 4 ) = − 5 3
C = 3 − 4 5 = 11 5 C = 3 - \frac{4}{5} = \frac{11}{5} C = 3 − 5 4 = 5 11
The integral splits into three parts:
I = 4 5 ∫ 1 d x − 3 5 ∫ cos x − 2 sin x sin x + 2 cos x + 1 d x + 11 5 ∫ d x sin x + 2 cos x + 1 I = \frac{4}{5}\int 1\,dx - \frac{3}{5}\int \frac{\cos x - 2\sin x}{\sin x + 2\cos x + 1}\,dx + \frac{11}{5}\int \frac{dx}{\sin x + 2\cos x + 1} I = 5 4 ∫ 1 d x − 5 3 ∫ sin x + 2 cos x + 1 cos x − 2 sin x d x + 5 11 ∫ sin x + 2 cos x + 1 d x
I = 4 5 x − 3 5 ln ∣ sin x + 2 cos x + 1 ∣ + 11 5 I 1 I = \frac{4}{5}x - \frac{3}{5}\ln|\sin x + 2\cos x + 1| + \frac{11}{5} I_1 I = 5 4 x − 5 3 ln ∣ sin x + 2 cos x + 1∣ + 5 11 I 1
To evaluate I 1 = ∫ d x sin x + 2 cos x + 1 I_1 = \int \frac{dx}{\sin x + 2\cos x + 1} I 1 = ∫ s i n x + 2 c o s x + 1 d x , use the Weierstrass substitution t = tan ( x / 2 ) t = \tan(x/2) t = tan ( x /2 ) :
sin x + 2 cos x + 1 = 2 t + 2 ( 1 − t 2 ) + ( 1 + t 2 ) 1 + t 2 = 3 + 2 t − t 2 1 + t 2 \sin x + 2\cos x + 1 = \frac{2t + 2(1 - t^2) + (1 + t^2)}{1 + t^2} = \frac{3 + 2t - t^2}{1 + t^2} sin x + 2 cos x + 1 = 1 + t 2 2 t + 2 ( 1 − t 2 ) + ( 1 + t 2 ) = 1 + t 2 3 + 2 t − t 2
I 1 = ∫ 2 d t 1 + t 2 3 + 2 t − t 2 1 + t 2 = ∫ 2 d t 3 + 2 t − t 2 = 2 ∫ d t 4 − ( t − 1 ) 2 = 2 ⋅ 1 2 ( 2 ) ln ∣ 2 + ( t − 1 ) 2 − ( t − 1 ) ∣ = 1 2 ln ∣ t + 1 3 − t ∣ I_1 = \int \frac{\frac{2\,dt}{1 + t^2}}{\frac{3 + 2t - t^2}{1 + t^2}} = \int \frac{2\,dt}{3 + 2t - t^2} = 2\int \frac{dt}{4 - (t - 1)^2} = 2 \cdot \frac{1}{2(2)}\ln\left| \frac{2 + (t - 1)}{2 - (t - 1)} \right| = \frac{1}{2}\ln\left| \frac{t + 1}{3 - t} \right| I 1 = ∫ 1 + t 2 3 + 2 t − t 2 1 + t 2 2 d t = ∫ 3 + 2 t − t 2 2 d t = 2 ∫ 4 − ( t − 1 ) 2 d t = 2 ⋅ 2 ( 2 ) 1 ln 2 − ( t − 1 ) 2 + ( t − 1 ) = 2 1 ln 3 − t t + 1
Substitute t = tan ( x / 2 ) t = \tan(x/2) t = tan ( x /2 ) and combine into I I I :
I = 4 5 x − 3 5 ln ∣ sin x + 2 cos x + 1 ∣ + 11 10 ln ∣ tan ( x / 2 ) + 1 3 − tan ( x / 2 ) ∣ + C I = \frac{4}{5}x - \frac{3}{5}\ln|\sin x + 2\cos x + 1| + \frac{11}{10}\ln\left| \frac{\tan(x/2) + 1}{3 - \tan(x/2)} \right| + C I = 5 4 x − 5 3 ln ∣ sin x + 2 cos x + 1∣ + 10 11 ln 3 − tan ( x /2 ) tan ( x /2 ) + 1 + C
Quadratic Denominators with Even Powers§
When the denominator contains even powers of sine and cosine:
∫ d x a + b cos 2 x , ∫ d x a + b sin 2 x , ∫ d x a cos 2 x + b sin x cos x + c sin 2 x , ∫ d x ( a sin x + b cos x ) 2 \int \frac{dx}{a + b\cos^2 x}, \qquad \int \frac{dx}{a + b\sin^2 x}, \qquad \int \frac{dx}{a\cos^2 x + b\sin x\cos x + c\sin^2 x}, \qquad \int \frac{dx}{(a\sin x + b\cos x)^2} ∫ a + b cos 2 x d x , ∫ a + b sin 2 x d x , ∫ a cos 2 x + b sin x cos x + c sin 2 x d x , ∫ ( a sin x + b cos x ) 2 d x
the half-angle substitution t = tan ( x / 2 ) t = \tan(x/2) t = tan ( x /2 ) would create a fourth-degree polynomial, which is needlessly difficult.
Instead, we use the Tangent Substitution :
t = tan x ⟹ d t = sec 2 x d x t = \tan x \implies dt = \sec^2 x\,dx t = tan x ⟹ d t = sec 2 x d x
The Standard Procedure§
Divide both the numerator and the denominator by cos 2 x \cos^2 x cos 2 x .
The numerator becomes d x cos 2 x = sec 2 x d x \frac{dx}{\cos^2 x} = \sec^2 x\,dx c o s 2 x d x = sec 2 x d x , which provides the differential d t dt d t .
In the denominator, any constant term k k k becomes k sec 2 x = k ( 1 + tan 2 x ) k\sec^2 x = k(1 + \tan^2 x) k sec 2 x = k ( 1 + tan 2 x ) .
The integral reduces to a standard quadratic rational form ∫ d t A t 2 + B t + C \int \frac{dt}{At^2 + Bt + C} ∫ A t 2 + B t + C d t .
Example 10§
Evaluate:
I = ∫ d x 1 + 3 cos 2 x I = \int \frac{dx}{1 + 3\cos^2 x} I = ∫ 1 + 3 cos 2 x d x
Solution:
Divide numerator and denominator by cos 2 x \cos^2 x cos 2 x :
I = ∫ sec 2 x d x sec 2 x + 3 I = \int \frac{\sec^2 x\,dx}{\sec^2 x + 3} I = ∫ sec 2 x + 3 sec 2 x d x
Replace sec 2 x \sec^2 x sec 2 x in the denominator with 1 + tan 2 x 1 + \tan^2 x 1 + tan 2 x :
I = ∫ sec 2 x d x ( 1 + tan 2 x ) + 3 = ∫ sec 2 x d x tan 2 x + 4 I = \int \frac{\sec^2 x\,dx}{(1 + \tan^2 x) + 3} = \int \frac{\sec^2 x\,dx}{\tan^2 x + 4} I = ∫ ( 1 + tan 2 x ) + 3 sec 2 x d x = ∫ tan 2 x + 4 sec 2 x d x
Let:
t = tan x ⟹ d t = sec 2 x d x t = \tan x \implies dt = \sec^2 x\,dx t = tan x ⟹ d t = sec 2 x d x
Substitute into the integral:
I = ∫ d t t 2 + 2 2 = 1 2 tan − 1 ( t 2 ) + C I = \int \frac{dt}{t^2 + 2^2} = \frac{1}{2}\tan^{-1}\left(\frac{t}{2}\right) + C I = ∫ t 2 + 2 2 d t = 2 1 tan − 1 ( 2 t ) + C
Returning to x x x :
I = 1 2 tan − 1 ( tan x 2 ) + C I = \frac{1}{2}\tan^{-1}\left(\frac{\tan x}{2}\right) + C I = 2 1 tan − 1 ( 2 tan x ) + C
Example 11§
Evaluate:
I = ∫ d x 2 sin 2 x + 3 cos 2 x I = \int \frac{dx}{2\sin^2 x + 3\cos^2 x} I = ∫ 2 sin 2 x + 3 cos 2 x d x
Solution:
Divide numerator and denominator by cos 2 x \cos^2 x cos 2 x :
I = ∫ sec 2 x d x 2 tan 2 x + 3 = 1 2 ∫ sec 2 x d x tan 2 x + 3 2 I = \int \frac{\sec^2 x\,dx}{2\tan^2 x + 3} = \frac{1}{2}\int \frac{\sec^2 x\,dx}{\tan^2 x + \frac{3}{2}} I = ∫ 2 tan 2 x + 3 sec 2 x d x = 2 1 ∫ tan 2 x + 2 3 sec 2 x d x
Let t = tan x ⟹ d t = sec 2 x d x t = \tan x \implies dt = \sec^2 x\,dx t = tan x ⟹ d t = sec 2 x d x :
I = 1 2 ∫ d t t 2 + ( 3 2 ) 2 = 1 2 ⋅ 1 3 / 2 tan − 1 ( t 3 / 2 ) + C I = \frac{1}{2}\int \frac{dt}{t^2 + \left(\sqrt{\frac{3}{2}}\right)^2} = \frac{1}{2} \cdot \frac{1}{\sqrt{3/2}}\tan^{-1}\left( \frac{t}{\sqrt{3/2}} \right) + C I = 2 1 ∫ t 2 + ( 2 3 ) 2 d t = 2 1 ⋅ 3/2 1 tan − 1 ( 3/2 t ) + C
Simplify the leading coefficient:
1 2 ⋅ 2 3 = 1 2 3 = 1 6 \frac{1}{2} \cdot \frac{\sqrt{2}}{\sqrt{3}} = \frac{1}{\sqrt{2}\sqrt{3}} = \frac{1}{\sqrt{6}} 2 1 ⋅ 3 2 = 2 3 1 = 6 1
Therefore:
I = 1 6 tan − 1 ( 2 tan x 3 ) + C I = \frac{1}{\sqrt{6}}\tan^{-1}\left( \frac{\sqrt{2}\tan x}{\sqrt{3}} \right) + C I = 6 1 tan − 1 ( 3 2 tan x ) + C
Example 12§
Evaluate:
I = ∫ d x 1 + 3 sin 2 x + 8 cos 2 x I = \int \frac{dx}{1 + 3\sin^2 x + 8\cos^2 x} I = ∫ 1 + 3 sin 2 x + 8 cos 2 x d x
Solution:
Divide numerator and denominator by cos 2 x \cos^2 x cos 2 x :
I = ∫ sec 2 x d x sec 2 x + 3 tan 2 x + 8 I = \int \frac{\sec^2 x\,dx}{\sec^2 x + 3\tan^2 x + 8} I = ∫ sec 2 x + 3 tan 2 x + 8 sec 2 x d x
Replace sec 2 x \sec^2 x sec 2 x with 1 + tan 2 x 1 + \tan^2 x 1 + tan 2 x :
I = ∫ sec 2 x d x ( 1 + tan 2 x ) + 3 tan 2 x + 8 = ∫ sec 2 x d x 4 tan 2 x + 9 I = \int \frac{\sec^2 x\,dx}{(1 + \tan^2 x) + 3\tan^2 x + 8} = \int \frac{\sec^2 x\,dx}{4\tan^2 x + 9} I = ∫ ( 1 + tan 2 x ) + 3 tan 2 x + 8 sec 2 x d x = ∫ 4 tan 2 x + 9 sec 2 x d x
Let t = tan x ⟹ d t = sec 2 x d x t = \tan x \implies dt = \sec^2 x\,dx t = tan x ⟹ d t = sec 2 x d x :
I = ∫ d t 4 t 2 + 9 = 1 4 ∫ d t t 2 + ( 3 2 ) 2 I = \int \frac{dt}{4t^2 + 9} = \frac{1}{4}\int \frac{dt}{t^2 + \left(\frac{3}{2}\right)^2} I = ∫ 4 t 2 + 9 d t = 4 1 ∫ t 2 + ( 2 3 ) 2 d t
Using the arctangent formula:
I = 1 4 ⋅ 1 3 / 2 tan − 1 ( t 3 / 2 ) + C = 1 6 tan − 1 ( 2 tan x 3 ) + C I = \frac{1}{4} \cdot \frac{1}{3/2}\tan^{-1}\left( \frac{t}{3/2} \right) + C = \frac{1}{6}\tan^{-1}\left( \frac{2\tan x}{3} \right) + C I = 4 1 ⋅ 3/2 1 tan − 1 ( 3/2 t ) + C = 6 1 tan − 1 ( 3 2 tan x ) + C
Example 13§
Evaluate:
I = ∫ d x ( 2 sin x + 3 cos x ) 2 I = \int \frac{dx}{(2\sin x + 3\cos x)^2} I = ∫ ( 2 sin x + 3 cos x ) 2 d x
Solution:
Divide numerator and denominator by cos 2 x \cos^2 x cos 2 x :
I = ∫ sec 2 x d x ( 2 tan x + 3 ) 2 I = \int \frac{\sec^2 x\,dx}{(2\tan x + 3)^2} I = ∫ ( 2 tan x + 3 ) 2 sec 2 x d x
Let:
t = 2 tan x + 3 ⟹ d t = 2 sec 2 x d x ⟹ sec 2 x d x = d t 2 t = 2\tan x + 3 \implies dt = 2\sec^2 x\,dx \implies \sec^2 x\,dx = \frac{dt}{2} t = 2 tan x + 3 ⟹ d t = 2 sec 2 x d x ⟹ sec 2 x d x = 2 d t
Substitute into the integral:
I = ∫ d t 2 t 2 = 1 2 ∫ t − 2 d t = − 1 2 t + C I = \int \frac{\frac{dt}{2}}{t^2} = \frac{1}{2}\int t^{-2}\,dt = -\frac{1}{2t} + C I = ∫ t 2 2 d t = 2 1 ∫ t − 2 d t = − 2 t 1 + C
Substitute t = 2 tan x + 3 t = 2\tan x + 3 t = 2 tan x + 3 :
I = − 1 2 ( 2 tan x + 3 ) + C I = -\frac{1}{2(2\tan x + 3)} + C I = − 2 ( 2 tan x + 3 ) 1 + C
Shifted Angle Differences in Denominators§
A classic class of problems features products of sines or cosines with shifted phase arguments in the denominator:
∫ d x sin ( x − a ) sin ( x − b ) , ∫ d x cos ( x − a ) cos ( x − b ) , ∫ d x sin ( x − a ) cos ( x − b ) \int \frac{dx}{\sin(x - a)\sin(x - b)}, \qquad \int \frac{dx}{\cos(x - a)\cos(x - b)}, \qquad \int \frac{dx}{\sin(x - a)\cos(x - b)} ∫ sin ( x − a ) sin ( x − b ) d x , ∫ cos ( x − a ) cos ( x − b ) d x , ∫ sin ( x − a ) cos ( x − b ) d x
The Algebraic Artifice§
Notice that the difference between the two angles is independent of the variable x x x :
( x − a ) − ( x − b ) = b − a or ( x − b ) − ( x − a ) = a − b (x - a) - (x - b) = b - a \qquad \text{or} \qquad (x - b) - (x - a) = a - b ( x − a ) − ( x − b ) = b − a or ( x − b ) − ( x − a ) = a − b
We multiply and divide the integral by the constant trigonometric term sin ( a − b ) \sin(a - b) sin ( a − b ) or cos ( a − b ) \cos(a - b) cos ( a − b ) :
When both factors are of the same kind (both sines or both cosines), multiply and divide by sin ( a − b ) \sin(a - b) sin ( a − b ) .
When the factors are of different kinds (one sine and one cosine), multiply and divide by cos ( a − b ) \cos(a - b) cos ( a − b ) .
Expanding the numerator using addition formulas cancels one factor in each term, converting the integrand into basic tangents and cotangents.
Example 14§
Evaluate:
I = ∫ d x sin ( x − a ) sin ( x − b ) I = \int \frac{dx}{\sin(x - a)\sin(x - b)} I = ∫ sin ( x − a ) sin ( x − b ) d x
Solution:
Multiply and divide by sin ( a − b ) \sin(a - b) sin ( a − b ) :
I = 1 sin ( a − b ) ∫ sin ( a − b ) sin ( x − a ) sin ( x − b ) d x I = \frac{1}{\sin(a - b)}\int \frac{\sin(a - b)}{\sin(x - a)\sin(x - b)}\,dx I = sin ( a − b ) 1 ∫ sin ( x − a ) sin ( x − b ) sin ( a − b ) d x
Rewrite a − b a - b a − b as ( x − b ) − ( x − a ) (x - b) - (x - a) ( x − b ) − ( x − a ) :
sin ( a − b ) = sin [ ( x − b ) − ( x − a ) ] = sin ( x − b ) cos ( x − a ) − cos ( x − b ) sin ( x − a ) \sin(a - b) = \sin[(x - b) - (x - a)] = \sin(x - b)\cos(x - a) - \cos(x - b)\sin(x - a) sin ( a − b ) = sin [( x − b ) − ( x − a )] = sin ( x − b ) cos ( x − a ) − cos ( x − b ) sin ( x − a )
Divide through by the denominator:
sin ( a − b ) sin ( x − a ) sin ( x − b ) = sin ( x − b ) cos ( x − a ) sin ( x − a ) sin ( x − b ) − cos ( x − b ) sin ( x − a ) sin ( x − a ) sin ( x − b ) \frac{\sin(a - b)}{\sin(x - a)\sin(x - b)} = \frac{\sin(x - b)\cos(x - a)}{\sin(x - a)\sin(x - b)} - \frac{\cos(x - b)\sin(x - a)}{\sin(x - a)\sin(x - b)} sin ( x − a ) sin ( x − b ) sin ( a − b ) = sin ( x − a ) sin ( x − b ) sin ( x − b ) cos ( x − a ) − sin ( x − a ) sin ( x − b ) cos ( x − b ) sin ( x − a )
sin ( a − b ) sin ( x − a ) sin ( x − b ) = cot ( x − a ) − cot ( x − b ) \frac{\sin(a - b)}{\sin(x - a)\sin(x - b)} = \cot(x - a) - \cot(x - b) sin ( x − a ) sin ( x − b ) sin ( a − b ) = cot ( x − a ) − cot ( x − b )
Integrate directly:
I = 1 sin ( a − b ) ∫ [ cot ( x − a ) − cot ( x − b ) ] d x I = \frac{1}{\sin(a - b)}\int [\cot(x - a) - \cot(x - b)]dx I = sin ( a − b ) 1 ∫ [ cot ( x − a ) − cot ( x − b )] d x
I = 1 sin ( a − b ) ( ln ∣ sin ( x − a ) ∣ − ln ∣ sin ( x − b ) ∣ ) + C I = \frac{1}{\sin(a - b)}\left( \ln|\sin(x - a)| - \ln|\sin(x - b)| \right) + C I = sin ( a − b ) 1 ( ln ∣ sin ( x − a ) ∣ − ln ∣ sin ( x − b ) ∣ ) + C
Applying the logarithm quotient rule:
I = 1 sin ( a − b ) ln ∣ sin ( x − a ) sin ( x − b ) ∣ + C I = \frac{1}{\sin(a - b)}\ln\left| \frac{\sin(x - a)}{\sin(x - b)} \right| + C I = sin ( a − b ) 1 ln sin ( x − b ) sin ( x − a ) + C
Example 15§
Evaluate:
I = ∫ d x cos ( x − a ) cos ( x − b ) I = \int \frac{dx}{\cos(x - a)\cos(x - b)} I = ∫ cos ( x − a ) cos ( x − b ) d x
Solution:
Both factors are cosines (same kind), so multiply and divide by sin ( a − b ) \sin(a - b) sin ( a − b ) :
I = 1 sin ( a − b ) ∫ sin [ ( x − b ) − ( x − a ) ] cos ( x − a ) cos ( x − b ) d x I = \frac{1}{\sin(a - b)}\int \frac{\sin[(x - b) - (x - a)]}{\cos(x - a)\cos(x - b)}\,dx I = sin ( a − b ) 1 ∫ cos ( x − a ) cos ( x − b ) sin [( x − b ) − ( x − a )] d x
Expand the numerator:
sin [ ( x − b ) − ( x − a ) ] = sin ( x − b ) cos ( x − a ) − cos ( x − b ) sin ( x − a ) \sin[(x - b) - (x - a)] = \sin(x - b)\cos(x - a) - \cos(x - b)\sin(x - a) sin [( x − b ) − ( x − a )] = sin ( x − b ) cos ( x − a ) − cos ( x − b ) sin ( x − a )
Divide by the denominator:
sin ( x − b ) cos ( x − a ) cos ( x − a ) cos ( x − b ) − cos ( x − b ) sin ( x − a ) cos ( x − a ) cos ( x − b ) = tan ( x − b ) − tan ( x − a ) \frac{\sin(x - b)\cos(x - a)}{\cos(x - a)\cos(x - b)} - \frac{\cos(x - b)\sin(x - a)}{\cos(x - a)\cos(x - b)} = \tan(x - b) - \tan(x - a) cos ( x − a ) cos ( x − b ) sin ( x − b ) cos ( x − a ) − cos ( x − a ) cos ( x − b ) cos ( x − b ) sin ( x − a ) = tan ( x − b ) − tan ( x − a )
Substitute into the integral:
I = 1 sin ( a − b ) ∫ [ tan ( x − b ) − tan ( x − a ) ] d x I = \frac{1}{\sin(a - b)}\int [\tan(x - b) - \tan(x - a)]dx I = sin ( a − b ) 1 ∫ [ tan ( x − b ) − tan ( x − a )] d x
Recall that ∫ tan u d u = − ln ∣ cos u ∣ \int \tan u\,du = -\ln|\cos u| ∫ tan u d u = − ln ∣ cos u ∣ :
I = 1 sin ( a − b ) ( − ln ∣ cos ( x − b ) ∣ + ln ∣ cos ( x − a ) ∣ ) + C I = \frac{1}{\sin(a - b)}\left( -\ln|\cos(x - b)| + \ln|\cos(x - a)| \right) + C I = sin ( a − b ) 1 ( − ln ∣ cos ( x − b ) ∣ + ln ∣ cos ( x − a ) ∣ ) + C
I = 1 sin ( a − b ) ln ∣ cos ( x − a ) cos ( x − b ) ∣ + C I = \frac{1}{\sin(a - b)}\ln\left| \frac{\cos(x - a)}{\cos(x - b)} \right| + C I = sin ( a − b ) 1 ln cos ( x − b ) cos ( x − a ) + C
Example 16§
Evaluate:
I = ∫ d x sin ( x − a ) cos ( x − b ) I = \int \frac{dx}{\sin(x - a)\cos(x - b)} I = ∫ sin ( x − a ) cos ( x − b ) d x
Solution:
Here the factors in the denominator are mixed (one sine and one cosine). Multiply and divide by cos ( a − b ) \cos(a - b) cos ( a − b ) :
I = 1 cos ( a − b ) ∫ cos [ ( x − a ) − ( x − b ) ] sin ( x − a ) cos ( x − b ) d x I = \frac{1}{\cos(a - b)}\int \frac{\cos[(x - a) - (x - b)]}{\sin(x - a)\cos(x - b)}\,dx I = cos ( a − b ) 1 ∫ sin ( x − a ) cos ( x − b ) cos [( x − a ) − ( x − b )] d x
Expand using the cosine subtraction formula cos ( A − B ) = cos A cos B + sin A sin B \cos(A - B) = \cos A\cos B + \sin A\sin B cos ( A − B ) = cos A cos B + sin A sin B :
cos [ ( x − a ) − ( x − b ) ] = cos ( x − a ) cos ( x − b ) + sin ( x − a ) sin ( x − b ) \cos[(x - a) - (x - b)] = \cos(x - a)\cos(x - b) + \sin(x - a)\sin(x - b) cos [( x − a ) − ( x − b )] = cos ( x − a ) cos ( x − b ) + sin ( x − a ) sin ( x − b )
Divide through by the denominator:
cos ( x − a ) cos ( x − b ) sin ( x − a ) cos ( x − b ) + sin ( x − a ) sin ( x − b ) sin ( x − a ) cos ( x − b ) = cot ( x − a ) + tan ( x − b ) \frac{\cos(x - a)\cos(x - b)}{\sin(x - a)\cos(x - b)} + \frac{\sin(x - a)\sin(x - b)}{\sin(x - a)\cos(x - b)} = \cot(x - a) + \tan(x - b) sin ( x − a ) cos ( x − b ) cos ( x − a ) cos ( x − b ) + sin ( x − a ) cos ( x − b ) sin ( x − a ) sin ( x − b ) = cot ( x − a ) + tan ( x − b )
Substitute into the integral:
I = 1 cos ( a − b ) ∫ [ cot ( x − a ) + tan ( x − b ) ] d x I = \frac{1}{\cos(a - b)}\int [\cot(x - a) + \tan(x - b)]dx I = cos ( a − b ) 1 ∫ [ cot ( x − a ) + tan ( x − b )] d x
Integrating:
I = 1 cos ( a − b ) ( ln ∣ sin ( x − a ) ∣ − ln ∣ cos ( x − b ) ∣ ) + C I = \frac{1}{\cos(a - b)}\left( \ln|\sin(x - a)| - \ln|\cos(x - b)| \right) + C I = cos ( a − b ) 1 ( ln ∣ sin ( x − a ) ∣ − ln ∣ cos ( x − b ) ∣ ) + C
Combining the logarithms:
I = 1 cos ( a − b ) ln ∣ sin ( x − a ) cos ( x − b ) ∣ + C I = \frac{1}{\cos(a - b)}\ln\left| \frac{\sin(x - a)}{\cos(x - b)} \right| + C I = cos ( a − b ) 1 ln cos ( x − b ) sin ( x − a ) + C