Mathematica 9 is now available
Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Using "=" vs ":="

  • To: mathgroup at
  • Subject: [mg70683] RE: [mg70664] Using "=" vs ":="
  • From: "David Park" <djmp at>
  • Date: Mon, 23 Oct 2006 02:50:09 -0400 (EDT)


The problem is not '=' vs. ':='. 
The problem is Sin(x^2+y^2) vs. Sin[x^2+y^2].

The first form is not a function but just a multiplication.

David Park
djmp at 

From: misha [mailto:iamisha1 at]
To: mathgroup at

I'm going through Mathematic by Example, 2nd ed., (Abell and Braselton), 
and have come across something that puzzles me.

Chapter 2, Section 2, Example 8
Define f(x,y)=1-sin(x^2+y^2)

So I first try,
In[1]:= f[x_, y_]:=1-Sin(x^2+y^2)
No problem so far...
In[2]:= f[x,y]
Still no problem...
Out[3]:=1-5 Sin


I noticed that rather than using ":=" to "simply define" this function, 
as opposed to (just) "=" to "define and compute" this function, I get 
different subsequent behavior.  Specifically, doing the above with just 
"=", works fine.
In[1]:= f[x_, y_]=1-Sin(x^2+y^2)

My question is, Why?  What's the difference between ":=" and "=" for 
defining functions?


  • Prev by Date: Re: are there any methods of figuring out how "large" a piece of typeset textual data will be?
  • Next by Date: Re: Plot3D question
  • Previous by thread: Re: Using "=" vs ":="
  • Next by thread: Re: Using "=" vs ":="