contradictory results with limit


Modérateur : xcasadmin

Messages : 294
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

contradictory results with limit

Message par lukamar » mer. déc. 27, 2017 7:15 pm

the command

Code : Tout sélectionner

gives sqrt(2), but this limit does not exists actually. If one inputs

Code : Tout sélectionner

limit(acos(1-x^2)/ln(1+x),x,0,-1); limit(acos(1-x^2)/ln(1+x),x,0,1)
the correct results -sqrt(2) and sqrt(2), respectively, are obtained. One-sided limits differ (because ln(1+x) changes sign), so limit can't exist.

By the way, what's the purpose of bounded_function? Function limit returns those in cases when limit does not exist and is not +/-infinity (for example, limit(sin(x),x,inf)). But wouldn't it be more convenient to just return undef in such cases?

Messages : 5055
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: contradictory results with limit

Message par parisse » jeu. déc. 28, 2017 6:35 pm

That's because acos does not behave like an analytic function at 1, I will add a check in limit.
I keep bounded function because it is more informative than undef.