Albert Rich schrieb: > > On Sunday, October 6, 2013 6:44:47 AM UTC-10, clicl...@freenet.de wrote: > > > > I always suspected that Derive wants to keep some of its secrets from > > the competition! And I am not glad to hear that Rubi no longer returns > > continuous antiderivatives for this type of integrand - but I suppose > > that's easily put back in. Otherwise I concur absolutely. > > Derive does not intentionally keep secret its method of finding > continuous antiderivatives, and having Rubi generate continuous ones > is nontrivial. Unfortunately the information required to achieve > continuity is lost when single-stepping through the integration, so > Derive is only able to return a discontinuous antiderivative. > > Discontinuous antiderivatives often result when the substitution > u=tan(theta) or u=tan(theta/2) is used to integrate trigonometric > expressions. The algorithm Derive uses to make such antiderivatives > continuous involves taking the difference of two limits to find the > piecewise constant function required to achieve continuity. It is > described in the 1994 paper I co-authored with D.J. Jeffrey The > Evaluation of Trigonometric Integrals Avoiding Spurious > Discontinuities at > http://www.apmaths.uwo.ca/~djeffrey/Offprints/toms1994.pdf. > The 1994 Jeffrey paper The Importance of Being Continuous at > http://www.apmaths.uwo.ca/~djeffrey/Offprints/importan.pdf > describes how to merge this piecewise constant term with the > discontinuous inverse tangent term to obtain the desired optimal > results for examples #16 and #56 in Chapter 1 of Timofeevs book. > > However this messy algorithm is not appropriate for an elegant, > rule-based system; and it requires the host CAS provide a strong limit > package and good algebraic simplification. So I was delighted to > discover the following identity that makes it easy to transform > discontinuous antiderivatives into continuous ones: > > If g(x) = arctan(a*tan f(x)) and > h(x) = f(x) - arctan(cos f(x)*sin f(x) / (a/(1-a) + cos f(x)^2), > then g(x) = h(x). > > Note that g(x) is discontinuous whenever f(x) mod pi equals pi/2. But > if a>0 and f(x) is real, then the denominator a/(1-a)+cos f(x)^2 is > never zero and so h(x) is continuous. And since the derivatives of > g(x) and h(x) are equal, discontinuous terms in antiderivatives of the > form g(x) can be replaced by continuous ones of the form h(x), thus > resulting in antiderivatives continuous on the real line. > > There are analogous identities for inverse tangents of cotangents, and > inverse cotangents of tangents and cotangents. Also I have > generalized the identity to handle discontinuous antiderivatives of > the form arctan(a+b*tan f(x)). I leave this generalization as an > exercise for intrepid readers... > > The next release of Rubi will take advantage of these identities to > produce continuous trig antiderivatives, thereby making the > computation of definite integrals easy and reliable. >
Thanks for the explanation. I am briefly surfacing from a dive into three-term recurrence relations, continued fractions, and fractional linear transformations.
Your present formula goes beyond what had been announced for Rubi 3, namely "continuitized" evaluation rules like