Question about a limit

Messages in english

Modérateur : xcasadmin

GermanXG
Messages : 26
Inscription : mar. déc. 24, 2024 6:24 am

Question about a limit

Message par GermanXG » sam. juin 13, 2026 4:31 am

The entry:

Code : Tout sélectionner

limit((x**2-1)/(1+surd(x,3)),x,-1)
returns the limit 0. And the message about that "surd" was temporarily changed to a fractional exponent. But the entry:

Code : Tout sélectionner

subs(simplify((x**2-1)/(1+surd(x,3))),x=-1)
returns -6 and the same message about "surd". Am I doing something wrong with the limit command?

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

Re: Question about a limit

Message par parisse » sam. juin 13, 2026 2:11 pm

The warning is the same but it is not sent by the same command: it's by limit in the 1st case and by simplify in the second case. Both will replace surd by x^(1/3) in intermediate computations.
simplify will replace your expression temporarily by (x**2-1)/(1+x^(1/3)), then simplify then replace back x^(1/3) by surd. Then evaluating at x=-1 will return -6.
limit will replace surd by x^(1/3), then since (-1)^(1/3) is a complex != -1 the limit at x=-1 is evaled to be 0.

GermanXG
Messages : 26
Inscription : mar. déc. 24, 2024 6:24 am

Re: Question about a limit

Message par GermanXG » dim. juin 14, 2026 5:48 am

What surprises me is that this is the case even when I don't have complex calculations activated. What if I want to use Xcas in a real analysis course? Are there any settings to restrict calculations to real numbers?

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

Re: Question about a limit

Message par parisse » dim. juin 14, 2026 5:34 pm

I would recommend to use fractional power instead of surd, like this near -1
limit((x**2-1)/(1-(-x)**(1/3)),x=-1)

GermanXG
Messages : 26
Inscription : mar. déc. 24, 2024 6:24 am

Re: Question about a limit

Message par GermanXG » lun. juin 15, 2026 4:09 am

Thanks!

Répondre