kill(all)$ minf;

     van=facebook.com/LearningCalculus$
     L'Hopitals rule (قاعدة لوبيتال): Preamble (مقدمة) (لانهاية)

     Test these statements by removing '$' characters.

isLimitMinf(L) := is(equal(L,minf))$ isLimitMinf(minf)$isLimitMinf(0)$isLimitMinf(inf)$
isLimitSifr(L) := is(equal(L,0))$ isLimitSifr(minf)$isLimitSifr(0)$isLimitSifr(inf)$
isLimitInf(L) := is(equal(L,inf))$ isLimitInf(minf)$isLimitInf(0)$isLimitInf(inf)$

OR(a,b):=a or b$

isLimitMinfOrSifrOrInf(L):=is(OR(OR(isLimitMinf(L),isLimitSifr(L)),isLimitInf(L)))$

isLHopitalApplicable(L):= isLimitMinfOrSifrOrInf(L)$

     L'Hopitals rule may be only used if BOTH conditions are true:

isLHopitalApplicable(limit(f(x),x,0))$
isLHopitalApplicable(limit(g(x),x,0))$

f(x):= log(1+sin(x))-log(1+x)$

g(x):= x^3$

A:isLHopitalApplicable(limit(f(x),x,0))$
B:isLHopitalApplicable(limit(g(x),x,0))$
is(A);
is(B);
is(A and B);

u(x):=f(x)/g(x)$ u(x);

limit(u(x),x,1);