To help my roommate on his calculus homework, I needed to know the integral of secant cubed of x. I fired up the trusty integral calculator at http://integrals.wolfram.com.
:eek:
Inverse hyperbolic tangents don’t look quite right. However, it looks as if there’s a pretty simple way to figure it out, just with integration by parts and some substitution (Integral of secant cubed - Wikipedia). What’s the deal?
I don’t have time to check the whole thing right now, but I don’t think they’re necessarily inequivalent. It might help you to know that for all real numbers (between -1 and 1, of course), tanh[sup]-1/sup = 1/2 ln ((1+x)/(1-x)), so the inverse hyperbolic tangent piece that Mathematica found is most likely equivalent to the logarithm piece in the Wikipedia article. (You’d have to use a double-angle formula or two to get them to match up perfectly, though.)
In addition to MikeS’s comment, keep in mind that Mathematica’s answer may differ from Wikipedia’s by a constant (which of course is entirely kosher for an indefinite integral like this).
As for why they’re different: Wikipedia’s answer involves integrating by parts. But looking at Mathematica’s answer, I’d guess that Mathematica went with a substitution approach: let u=tan(x/2), so x=2atan(u), sec(x)=(1+u^2)/(1-u^2), and dx = 2du/(1+u^2). It’s a standard trick for turning rational trig integrals into rational polynomial integrals, and integrating rational polynomials is a fairly algorithmic process, so it’s not surprising that Mathematica is taking that route.
It’s not the simplest answer, but it’s correct. It’s just the kind of answer you’re likely to get if you apply a very general algorithm to a very specific problem.