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

      Test these statements by removing '$' characters.

kill(all)$ minf$
OR(a,b) := a or b$ AND(a,b) := a and b$
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)$
isLimitMinfOrSifrOrInf(L):=is(OR(OR(isLimitMinf(L),isLimitSifr(L)),isLimitInf(L)))$
isLHopitalApplicable(L):= isLimitMinfOrSifrOrInf(L)$

f(x):=(sqrt(x)^sqrt(x)-x^x      )$
g(x):=(sqrt(x)^x      -x^sqrt(x))$
h(x):= f(x)/g(x)$ h(x);

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

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

diff(f(x),x,2)/diff(g(x),x,2);

limit(     f(x)     /     g(x),x,0);
limit(diff(f(x),x,2)/diff(g(x),x,2),x,0,plus);