
Re: Charlwood Fifty test results
Posted:
Jul 6, 2013 4:28 PM


"Nasser M. Abbasi" schrieb: > > On 7/6/2013 11:42 AM, clicliclic@freenet.de wrote: > > > > > If Rubi evaluates the integral > > > > INT((1  SIN(x))*SQRT(1 + SIN(x))/SIN(x), x) > > > > to > > > > 2*SQRT(1  SIN(x))  2*ATANH(SQRT(1  SIN(x))) > > > > then you have found a bug, since the derivative > > > > DIF(2*SQRT(1  SIN(x))  2*ATANH(SQRT(1  SIN(x))), x) > > > > equals > > > > COS(x)/SQRT(COS(x)^2)*(1  SIN(x))*SQRT(1 + SIN(x))/SIN(x) > > > > where the piecewise constant COS(x)/SQRT(COS(x)^2) differs from > > unity. > > > > Accordingly, a correct evaluation of the integral is > > > > 2*COS(x)/SQRT(1 + SIN(x))  2*ATANH(COS(x)/SQRT(1 + SIN(x))) > > > > Ok, please let me backup. Rubi does generate the result you showed > > 2* T1  2*ATANH( T1 ) > > Where > > T1 = COS(x)/SQRT(1 + SIN(x)) > > But I took it abone myself to just replace T1 above with > > T2 = SQRT(1  SIN(x)) > > since they seemed the same to me(*), so I wrote in this post > that Rubi gave > > 2* T2  2*ATANH( T2 ) > > Which you complained about. I see now that T1=T2 only from Pi/2..Pi/2. > > Sorry about this confusion. I need to review this whole process again > to see why it did not work for all x range using this. >  > (*) In T1, let COS(x) = SQRT(1SIN(X)^2), then > > T1 = SQRT( (1SIN(X)^2) / (1 + SIN(x)) ) > > Let > SIN(X) = Y > then it is the same as > T1 = SQRT ( (1Y^2)/(1+Y) ) > which is > T1 = SQRT ( 1Y ) > But Y = SIN(X), hence > T1 = SQRT ( 1 SIN(X) ) > which is T2 > > So this is what happened. >
COS(x) equals SQRT(COS(x)^2) only where pi/2 < ARG(COS(x)) <= pi/2; elsewhere one has COS(x) = SQRT(COS(x)^2). Your replacement of COS(x) by SQRT(1SIN(X)^2) = SQRT(COS(x)^2) therfore leads to corresponding sign flips in the T2based result.
Since Rubi manages to return the proper T1based result already, it shouldn't be hard to make it handle Charlwood's problem 41. It merely needs to be taught to normalize integrands like COT(x)*COS(x)/ SQRT(1 + SIN(x)) to their sineonly form. This would be just one normalization among others performed regularly, and would only require some twisting or minor extension of existing code, I guess.
Martin.

