Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum > General > > "How to convert the expression 3*x to a function?"

Post Reply:
Name:
Email Address:

Please send email when my message is replied to.

Url (optional):
Subject:
Message: view original message?
Attachment (optional):
Please answer this:2+2 =



Original Message (ID '74424') By Peter Pein:
Hi, Bill's solution works of course but i guess you wanted to know why your attempt did not. In[1]:= f = 3 x Out[1]= 3 x In[2]:= Function[x, f][Pi] Out[2]= 3 x does not work because Function does not evaluate its arguments: In[3]:= Attributes[Function] Out[3]= {HoldAll, Protected} In[4]:= Function[x, Evaluate[f]][Pi] Out[4]= 3 Pi does what you expect. Peter