From: Raymond T. <rt...@us...> - 2025-04-09 20:25:36
|
I notice that in the first case, we have `atan2((tan(x)-1)/2,-(tan(x)-1)/2)`. This is basically `-%pi/4` for small x. I suppose if we get a `atan2(0,0)` expression, we could look at the limit of `atan(y/x)` as x approaches 0 --- **[bugs:#4536] atan2(0,0) undefined error while evaluating a limit** **Status:** open **Group:** None **Created:** Sat Apr 05, 2025 07:17 PM UTC by Barton Willis **Last Updated:** Wed Apr 09, 2025 12:05 PM UTC **Owner:** nobody I think this is correct: ~~~ (%i9) xxx : integrate(log(cot(x)-1),x); (%o9) x*log(1/tan(x)-1)-(2*x*log((tan(x)^2-2*tan(x)+1)/2)+(%pi-2*atan2((tan(x)-1)/2,-((tan(x)-1)/2)))* log(tan(x)^2+1)+2*%i*li[2](-((%i*((%i+1)*tan(x)+%i-1))/2))+2*%i*li[2](%i*tan(x)+1)-2*%i*li[2](1-%i*tan(x))-2*%i*li[2](-((%i*((%i-1)*tan(x)+%i+1))/2))-4*x*log(tan(x)))/4 ~~~ But Maxima is unable to find the following limit of `xxx`: ~~~ (%i10) limit(xxx,x,%pi/4,'minus); atan2: atan2(0,0) is undefined. ~~~ Locally setting the non-user level option `generate-atan2` allows the calculation to finish (but I haven't attempted to show that the result is correct): ~~~ (%i11) xxx : block([?generate\-atan2 : false], integrate(log(cot(x)-1),x)); (xxx) x*log(1/tan(x)-1)-(4*x*log((tan(x)^2-2*tan(x)+1)/2)+3*%pi*log(tan(x)^2+1)+4*%i* li[2](-((%i*((%i+1)*tan(x)+%i-1))/2))+4*%i*li[2](%i*tan(x)+1)-4*%i*li[2](1-%i*tan(x))-4*%i* li[2](-((%i*((%i-1)*tan(x)+%i+1))/2))-8*x*log(tan(x)))/8 (%i12) limit(xxx,x,%pi/4,'minus); (%o12) -((%i*li[2](%i+1))/2)+(%i*li[2](1-%i))/2-(%pi*log(2)-2*%pi*log(-2))/8-(3*%pi*log(2))/8 ~~~ --- Sent from sourceforge.net because max...@li... is subscribed to https://sourceforge.net/p/maxima/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/maxima/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |