FW: [ maxima-Bugs-1051437 ] Trig integral error



Billinghurst, David (CALCRTS) [21/10/04 23:04 +1000]:
> This bug is annoying me enough to want to try and fix it.  
> Any thoughts on where to start looking?
> 
> Bugs item #1051437, was opened at 2004-10-21 22:21
> Message generated for change (Comment added) made by billingd
> You can respond by visiting: 
> https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1051437&group_id=4933
> 
> Category: None
> Group: None
> Status: Open
> Resolution: None
> Priority: 5
> Submitted By: David Billinghurst (billingd)
> Assigned to: Nobody/Anonymous (nobody)
> Summary: Trig integral error
> 
> Initial Comment:
> The integral of
>    2*COT(x)^2*COS(2*x)/(CSC(2*x)+COT(2*x));
> is wrong for maxima-5.9.1
> 

I only looked into the (indefinite) integral above, i.e.,
  integrate(2*COT(x)^2*COS(2*x)/(CSC(2*x)+COT(2*x)),x);

+++++ from my Maxima 5.9.1 ++++++++
(%i23) integrate(2*COT(x)^2*COS(2*x)/(CSC(2*x)+COT(2*x)),x);

  4*t^3*(2*t^2-1)/((1-t^2)*(2*t^2-1)-t^2+1)

Inverse of zero divisor?
 -- an error.  Quitting.  To debug this try DEBUGMODE(TRUE);
+++++++++++++++

  I then replaced COS(x) by t, and tried to integrate
	
  4*t^3*(2*t^2-1)/((1-t^2)*(2*t^2-1)-t^2+1)
	only to get again "Inverse of zero divisor?"

I then tried the partial fraction decomposition of 
  4*t^3*(2*t^2-1)/((1-t^2)*(2*t^2-1)-t^2+1)
only to get "Inverse of zero divisor?" one more time. 

O.K., now I isolated the denominator (using pickapart) and tried to
factor it. AGAIN "Inverse of zero divisor?" is Maxima's return. 

Even when I do the factoring by hand and then ask Maxima to 
  integrate(2*t*(2*t^2-1)/(1-t^2),t);
	the annoying "Inverse of zero divisor?" is the answer again.

At least divide(2*t*(2*t^2-1),1-t^2) and then
integrate(2*t/(1-t^2),t);
worked correctly.

In hope that this might be useful.

Milan Lukic


> (%i1) display2d:false;
> (%o1) FALSE
> (%i2) h: 2*COT(x)^2*COS(2*x)/(CSC(2*x)+COT(2*x));
> (%o2) 2*COT(x)^2*COS(2*x)/(CSC(2*x)+COT(2*x))
> (%i3) ih:integrate(h,x);
> (%o3) (2*LOG(SIN(x)^2+COS(x)^2+2*COS(x)+1)
> +2*LOG(SIN(x)^2+COS(x)^2-2*COS(x)+1)
>                                           +COS(2*x))
>        /2
> (%i4)  ev(ih,x=1.0,numer)-ev(ih,x=0.5,numer);
> (%o4) .6469013090248041
> (%i5) quad_qags(h,x,0.5,1);
> (%o5) [.1686767378171631,3.37999776996994E-
> 15,21,0]
> (%i6) h2:trigsimp(trigexpand(h));
> (%o6) (4*COS(x)^3-2*COS(x))/SIN(x)
> (%i7) ih2:integrate(h2,x);
> (%o7) LOG(COS(x)+1)+LOG(COS(x)-1)+2*COS(x)^2
> (%i8)  ev(ih2,x=1.0,numer)-ev(ih2,x=0.5,numer);
> (%o8) .1686767378171636
> 
> The integral over 0.5 < x < 1.0 at %o4 differs from the 
> numerical integral %o5 and the analytic integral of an 
> equivalent expression %o8.
> 
> Once this is fixed, activate equation (22) in 
> share/contrib/diffequations/tests/rtestode_murphy1.mac
> 
> 
> NOTICE
> This e-mail and any attachments are private and confidential and may contain privileged information. If you are not an authorised recipient, the copying or distribution of this e-mail and any attachments is prohibited and you must not read, print or act in reliance on this e-mail or attachments.
> This notice should not be removed.
> 
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima