The following example exhibits two (possibly related) problems in combining limits with derivatives:
(%i1) dg: diff(g(x), x);
d
(%o1) -- (g(x))
dx
(%i2) lim: limit(dg, x, 0);
d
(%o2) limit -- (g(x))
x -> 0 dx
(%i3) limit(lim, x, 0);
d
(%o3) limit (limit -- (g(x)))
x -> 0 x -> 0 dx
(%i4) limit(lim, a, 0);
d
(%o4) -- (g(x))
dx
Maxima version: branch_5_35_base_65_g7a1bf8c
The above happens with both GCL and ECL.
Bug still present in 5.47.