Subject: Rules and simplification question (newbie)
From: Doug Neubauer
Date: Tue, 23 May 2006 20:37:33 -0500
Hello,
I'm new to Maxima.
I have a question regarding rules and simplification.
I want to apply a rule such that the expression:
%e^-x^2 is replaced by gp(x)
When x is a variable it works fine, but when x
is an expression such as r/t, the rule doesn't work:
(%i2) display2d : false
(%o2) false
(%i3) matchdeclare(xx,true)
(%o3) done
(%i4) defrule(rule1,%e^-xx^2,gp(xx))
(%o4) rule1:?marrow(%e^-xx^2,gp(xx))
(%i5) ex:%e^-(r^2/t^2)
(%o5) %e^-(r^2/t^2)
(%i6) res1:apply1(ex,rule1)
(%o6) %e^-(r^2/t^2)
(%i7) kill(all)
(%o0) done
I tried applying factor(), expand(), et al. before
applying the rule, but it didn't help.
I looked through the manual, but I must be missing something.
Any help would be appreciated. Thanks.