integration of rational function of sine and cosine


The integration task

R(sinx,cosx)𝑑x, (1)

where the integrand is a rational function of sinx and cosx, changes via the Weierstrass substitutionMathworldPlanetmath

tanx2=t (2)

to a form having an integrand that is a rational function of t.  Namely, since  x=2arctant,  we have

dx= 211+t2dt, (3)

and we can substitute

sinx=2t1+t2,cosx=1-t21+t2, (4)

getting

R(sinx,cosx)𝑑x= 2R(2t1+t2,1-t21+t2)dt1+t2.

Proof of the formulae (4):  Using the double angle formulas of sine and cosine and then dividing the numerators and the denominators by  cos2x2  we obtain

sinx=2sinx2cosx2sin2x2+cos2x2=2tanx21+tan2x2=2t1+t2,
cosx=cos2x2-sin2x2sin2x2+cos2x2=1-tan2x21+tan2x2=1-t21+t2.

Example.  The above formulae give from  dxsinx  the result

dxsinx=1+t22t211+t2𝑑t=dtt=ln|t|+C=ln|tanx2|+C

(which can also be expressed in the form -ln|cscx+cotx|+C; see the goniometric formulasPlanetmathPlanetmath).

Note 1.  The substitution (2) is sometimes called the ‘‘universal trigonometric substitution’’ (http://planetmath.org/UniversalTrigonometricSubstitution).  In practice, it often gives rational functions that are too complicated.  In many cases, it is more profitable to use other substitutions:

  • In the case  R(sinx)cosxdx  the substitution  sinx=t  is simpler.

  • Similarly, in the case  R(cosx)sinxdx  the substitution  cosx=t  is simpler.

  • If the integrand depends only on tanx, the substitution  tanx=t  is simpler.

  • If the integrand is of the form  R(sin2x,cos2x),  one can use the substitution  tanx=t; then
    cos2x=11+tan2x=11+t2,   sin2x=1-cos2x=t21+t2,   dx=dt1+t2.

Example.  The integration of  dxcos4x𝑑x  is of the last case:

dxcos4x𝑑x=1(cos2x)2𝑑x=(1+t2)2dt1+t2=(1+t2)𝑑t=t33+t+C=13tan3x+tanx+C.

Example.  The integralDlmfPlanetmathI=dxcos3x𝑑x=sec3xdx  is a peculiar case in which one does not have to use the substitutions mentioned above, as integration by parts is a simpler method for evaluating this integral. Thus,

u=secxdu=secxtanxdx;dv=sec2xdxv=tanx.

Therefore,

I=sec3xdx=secxtanx-secxtan2xdx=secxtanx-secx(sec2x-1)𝑑x=secxtanx-I+secxdx,

and consequently

dxcos3x𝑑x=12(secxtanx+ln|secx+tanx|)+C.

Note 2.  There is also the ‘‘universal hyperbolic substitution’’ for integrating rational functions of hyperbolic sineMathworldPlanetmath and cosine:

tanhx2=t,dx=2dt1-t2,sinhx=2t1-t2,coshx=1+t21-t2

References

  • 1 Л. Д. Кдрячев: Математичецкии  анализ.  Издательство  ‘‘ВүсшаяШкола’’. Москва (1970).
Title integration of rational function of sine and cosine
Canonical name IntegrationOfRationalFunctionOfSineAndCosine
Date of creation 2013-03-22 17:05:15
Last modified on 2013-03-22 17:05:15
Owner pahio (2872)
Last modified by pahio (2872)
Numerical id 29
Author pahio (2872)
Entry type Topic
Classification msc 26A36
Synonym universal trigonometric substitution
Related topic GoniometricFormulae
Related topic SubstitutionForIntegration
Related topic WeierstrassSubstitutionFormulas
Related topic EulersSubstitutionsForIntegration
Related topic ErrorsCanCancelEachOtherOut
Defines universal hyperboloc substitution