Simple question about symbolic limits
Afficher commentaires plus anciens
Hello,
I am checking results derived by hand in a MATLAB (2019a) live script and have encountered the following problem (MWE below): When I try to take the limit of the expression
as (symbolic) variable l approaches 0, restricting
, MATLAB cannot find the limit I obtain by hand. However, when I choose arbitrary values for
instead of using an assumption, I get the same limit I derived by hand (which is independent of c). I suspect there is an obvious explanation for this that I am overlooking.
MWE:
%Declare symbolic variables:
syms l real;
syms t real; assumeAlso(t>1);
syms a real; assumeAlso(0<a<1);
syms p real; assumeAlso(0<p<1);
syms e real; assumeAlso(e>0);
syms c real; assumeAlso(c>0);
syms w real; assumeAlso(0<w<1);
%Functions:
phi = e/(1+c)*l^(1+c);
z = t/l*(1-exp(-l/t));
n = p*(1+c)/(p*(1+c)+z*l/phi*w);
pn = t*p*(1-n)*exp(-l/t)/n*(1-exp(-1*(t*p*(1-n)*exp(-l/t)/(a*n))^(-1)));
%Limits:
limit(pn,l,0,'right')
MATLAB cannot reduce this limit. However, when I instead impose, e.g.,
, via
syms l real;
syms t real; assumeAlso(t>1);
syms a real; assumeAlso(0<a<1);
syms p real; assumeAlso(0<p<1);
syms e real; assumeAlso(e>0);
syms c real; assumeAlso(c>0);
syms w real; assumeAlso(0<w<1);
%Functions:
phi = e/(1+0.1)*l^(1+0.1);
z = t/l*(1-exp(-l/t));
n = p*(1+0.1)/(p*(1+0.1)+z*l/phi*w);
pn = t*p*(1-n)*exp(-l/t)/n*(1-exp(-1*(t*p*(1-n)*exp(-l/t)/(a*n))^(-1)));
%Limits:
limit(pn,l,0,'right')
I get the result I derived by hand. The same holds for seemingly all other positive values of c. Any idea what I'm overlooking?
Thanks in advance.
Réponses (1)
Ayush Gupta
le 12 Juin 2020
0 votes
The limit specified is also dependent on c if c does not have small values. For small values of c, a simplified expression is yielded. Refer to the following link to know more about limit:
1 commentaire
Tristan Potter
le 13 Juin 2020
Modifié(e) : Tristan Potter
le 13 Juin 2020
Catégories
En savoir plus sur Assumptions dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

