210 CHAPTER 8. METHODS FOR FINDING ANTIDERIVATIVES
therefore, in terms of u, the antiderivative equals −u+2arctanu. Now replace u to obtain
− tan(
θ
2
)+2arctan
(tan(
θ
2
))+C.
This procedure can be expected to work in general. Suppose you want to find∫ p(cosθ ,sinθ)
q(cosθ ,sinθ)dθ
where p and q are polynomials in each argument. Make the substitution u = tan θ
2 . Asabove this means
du =
(1+ tan2
(θ
2
))12
dθ =12(1+u2)dθ .
It remains to substitute for sinθ and cosθ . Recall that sin(
θ
2
)=±
√1−cosθ
2 and cos(
θ
2
)=
±√
1+cosθ
2 . Thus,
tan(
θ
2
)=
±√
1− cosθ√1+ cosθ
and so
u2 = tan2(
θ
2
)=
1− cosθ
1+ cosθ
and solving this for cosθ and sinθ yields
cosθ =1−u2
1+u2 , sinθ =± 2u1+u2 .
It follows that in terms of u the integral becomes
∫ p(
1−u2
1+u2 ,± 2u1+u2
)q(
1−u2
1+u2 ,± 2u1+u2
) 2du1+u2
which is a rational function of u and so in theory, you might be able to find the integralfrom the method of partial fractions. As usual, there are no magic bullets. Even the besttechniques can fail if for no other reason than our inability to factor polynomials. In calcu-lus, there are big theorems like the fundamental theorem of calculus which have universalapplication and then there are many gimicks which sometimes work. This chapter has beendevoted to these gimmicks.
8.9 Using MATLABYou can use computer algebra systems to find antiderivatives and save a lot of pain. I willexplain for MATLAB and note that you can do it for any of the standard computer algebrasystems. Say you want to find the obnoxious antiderivatives∫ √
1+3x2dx