Use of Literal
- Subject: Use of Literal
- From: uunet!sun.acs.udel.edu!jack
- Date: Tue, 6 Mar 90 14:59:06 EST
- Apparently-to: mathgroup-send at yoda.ncsa.uiuc.edu
I want to define a function of Mathematica built-in function. I can do this but to evaluate it seems a little awkward. I must be doing something wrong!? In[1]:= f[Literal[Integrate[g_,x_]]]:=Integrate[g,x] + Sin[x] In[2]:= f[Integrate[q[t],t]] Out[2]= Integrate[q[t], t] + Sin[t] In[3]:= %/.q[t]->t^3 4 t Out[3]= -- + Sin[t] 4 In[4]:= "However................" In[5]:= r[t]:=t^3 In[6]:= f[Integrate[r[t],t]] 4 t Out[6]= f[--] 4 In[7]:= "or...."; In[8]:= r[t_]:=t^3 In[9]:= f[Integrate[r[t],t]] 4 t Out[9]= f[--]