## #653 freeof (exp, exp(x)) yields true

closed
nobody
2
2005-01-25
2004-12-05
No

freeof (exp, exp(x)) => true
although
freeof (sin, sin(x)) => false
(kill (f), freeof (f, f(x))) => false

Exponentials are always stored as %e^something, so
freeof (%e, exp(x)) => false

Dunno what is the right policy here. Substituting %e
for exp in the argument list (which is consistent with
the otherwise universal policy of substituting %e^x for
exp(x)) won't work right:
freeof (exp, exp(x)) hypothetically => false (OK)
freeof (exp, %e*2) hypothetically => false (OOPS)

Another answer is to not substitute %e^x for exp(x) but
that will have widespread effects (to put it mildly).

## Discussion

• Stavros Macrakis - 2005-01-24

Logged In: YES
user_id=588346

This is not a freeof issue.

It is not that exponentials are "stored as" %e^x, it is that
the expression exp(x) is simplified to %e^x. The function
'exp' just never appears in a simplified expression.

Similarly sin(%i) simplifies to %i*sinh(1). Surely you
don't expect freeof to "find" the sin in %i*sinh(1) or to
"find" the exp in 2^n (which is precisely equivalent to
exp(n*log(2)).

Of course, Maxima is not completely consistent about when it
canonicalizes and when it does not (even when this is
feasible). For example, by default it does *not* simplify
exp(n*log(2)) to 2^n, but to %e^(log(2)*n); it does not
simplify n! to gamma(n+1); etc.

• Robert Dodier - 2005-01-25

Logged In: YES
user_id=501686

Based on comments from Stavros, I'm closing this as a
non-bug; the observed effect is a consequence of
simplification. I'll add something about the effect of
simplification to the freeof description.

• Robert Dodier - 2005-01-25
• status: open --> closed