How to integrate? #int dx/(sin^2 x+3sin x cos x-cos^2 x) #

1 Answer
Sep 24, 2017

# int 1/(sin^2 x+3sin x cos x-cos^2 x) \ dx = 1/sqrt(13) \ ln |tan(x-1/2arctan(2/3))| + C#

Explanation:

We seek:

# I = int 1/(sin^2 x+3sin x cos x-cos^2 x) \ dx #
# \ \ = int 1/( 3/2(2sin x cos x) - (cos^2 x - sin^2 x) ) \ dx #
# \ \ = int 1/( 3/2sin2x - cos2x ) \ dx #
# \ \ = int 1/( 1/2( 3sin2x - 2cos2x ) ) \ dx #
# \ \ = 2 \ int 1/( 3sin2x - 2cos2x ) \ dx #

Now using the superposition property of sine and cosine, we can put the denominator into the form #Rsin(2x-alpha)#:

Suppose that:

# 3sin2x - 2cos2x -= Rsin(2x-alpha) #
# " " = R{sin2xcos alpha - cos2xsinalpha} #
# " " = (Rcos alpha)sin2x - (Rsinalpha)cos2x #

Equating coefficients of #sin2x# and #cos2x# we have:

# sin2x : \ \ \ Rcosalpha = 3 \ \ \ # ..... [A]
# cos2x : \ \ \ Rsinalpha = 2 \ \ \ # ..... [B]

We can find #R# using: #Eq [A]^2 + Eq[B]^2:#

# => R^2cos^2alpha + R^2sin^2alpha = 3^2 + 2^2 #
# :. R^2(cos^2alpha + sin^2alpha) = 9 + 4 #
# :. R^2 = 13 => R=sqrt(13) #

We can find #alpha# using: #Eq [B] divide Eq[B]:#

# => (Rsinalpha)/(Rcosalpha) = 2/3 #
# :. tan alpha = 2/3 => alpha = arctan(2/3)#

Using this we can write the integral as:

# I = 2 \ int 1/( sqrt(13)sin(2x-alpha) ) \ dx #
# \ \ = 2/sqrt(13) \ int 1/( sin(2x-alpha) ) \ dx #
# \ \ = 2/sqrt(13) \ int csc(2x-alpha) \ dx #

Now we can perform a simple substitution:

Let #u=2x-alpha => (du)/dx = 2 #

Substituting into the integral, we get:

# I = 2/sqrt(13) \ int \ 1/2 csc(u) \ du #
# \ \ = 1/sqrt(13) \ ln |tan(u/2)| #

Restoring the substitution, we get:

# I = 1/sqrt(13) \ ln |tan(x-alpha/2)| #
# \ \ = 1/sqrt(13) \ ln |tan(x-1/2arctan(2/3))| #

And of course, we shouldn't forget the integration constant; so:

# I = 1/sqrt(13) \ ln |tan(x-1/2arctan(2/3))| + C#