A Use for Interpretation

*To*: mathgroup at smc.vnet.net*Subject*: [mg85688] A Use for Interpretation*From*: "David Park" <djmpark at comcast.net>*Date*: Tue, 19 Feb 2008 02:00:08 -0500 (EST)

Since Version 6 appeared and I first encountered Interpretation I found it rather difficult to understand what use it might have. The examples in Help seem almost bizarre. Here is one use where it works rather well. Teachers might often be frustrated in demonstrating the behavior of basic function such as D, Integrate or Limit because Mathematica automatically evaluates using its built-in rules. With Interpretation we can define a pseudo routine that displays as the real routine and then apply our own basic transformation rules. Here is an example with a linear breakout of Integrate. integrate[integrand_, var_] := Interpretation[HoldForm[Integrate[integrand, var]], integrate[integrand, var]] We then define rules that breakout sums and constant factors. The rules even display in a nice form. rule1 = integrate[a_ + b_, x_] -> integrate[a, x] + integrate[b, x] rule2 = integrate[a_?(FreeQ[#, x] &) b_, x_] -> a integrate[b, x] Then we can demonstrate how these rules work, performing the actual integration in the last step. integrate[5 a Sin[x] + y Cos[x] + x^2, x] % //. rule1 % //. rule2 % /. Interpretation[a_, b_] :> ReleaseHold[a] -- David Park djmpark at comcast.net http://home.comcast.net/~djmpark/

**Follow-Ups**:**Re: A Use for Interpretation***From:*Murray Eisenberg <murray@math.umass.edu>