Re: [Maxima-bugs] [ maxima-Bugs-1281737 ] limit(atan(x)/(1/exp(1)-exp(-(1+x)^2)),x,inf,plus) - wrong



Milan Lukic wrote:

>* Raymond Toy; rtoy@earthlink.net> [2005-09-17 12:13:49 -0400]:
>
>  
>
>>Milan Lukic wrote:
>>    
>>
>>>* Raymond Toy <rtoy@earthlink.net> [2005-09-16 12:34:18 -0400]:
>>>
>>>      
>>>
>>I was mistaken.  It does try this first.  However, it calls factor on
>>the expression first, which converts it to
>>atan(x)*exp((1+x)^2)/(exp(x^2+2*x)-1).
>>
>>But this is of the form inf/inf.  At this point, I'm confused on exactly
>> it's trying to do.  More study needed if we really want to figure this out.
>>
>>    
>>
>I tried to see what happens if L'Hospital's rule is used on 
>atan(x)*exp((1+x)^2)/(exp(x^2+2*x)-1). After
>diff(numerator,x)/diff(denom,x),ratsimp;  it is clear to the human eye
>that (replacing atan(x) by %pi/2) that the new problem is basically a
>quotient of two cubic polynomials, yet Maxima insists on log(-1). It
>  
>
I'd have to study the code some more to figure out why it insist on
doing this.

>>Perhaps log(-1) is intended to mean there's some ambiguity in the
>>result?  With the patch, limit(log(-1-%i*x),x,0,plus) returns -%i*%pi/2,
>>preserving the appropriate sign and giving the expected answer.
>>
>>    
>>
>This interpretation makes sense, at least for people who already know
>that Maxima's handling of branch cuts is not full proof, but I would
>be happier then if it would return Log(-1), and let the user figure
>out which one of the branches applies in the particular case. Ideally,
>  
>
I think letting the user decide what log(-1) is is worse than not
returning an answer at all.  Even if the user knows about branch cuts,
he'll end up having to do the derivation itself to figure out what
branch to use.  And if you don't know what branch cuts are, you're
likely to choose the wrong answer.

We should fix the deficiencies in maxima's understanding of branch cuts.

But I agree, maxima probably should not have converted atan to log for
so quickly.

>I would prefer that it would return a correct and fully reliable
>result - or, since at this stage of development, we cannot completely
>trust its handling of logs, print some kind of warning. 
>BTW, did you mean -%i*%pi/2 or -%i*%pi above? I think that the later
>is correct.
>  
>
Yes, that's my mistake.  -%i*%pi/2 is for a different problem.

Ray