      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)$

limit(f(x),x,0);

f(x):= ((%e^x-2)^30-1)$
g(x):= x$
h(x):= f(x)/g(x)$ h(x);

is(equal(f(0),0) and equal(g(0),0));

      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);

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