Re: x/x
- To: mathgroup at smc.vnet.net
- Subject: [mg66712] Re: x/x
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Sat, 27 May 2006 21:03:12 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <e593im$3ju$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Sinan Kapçak wrote: > I plot the function f(x)=x/x in mathematica but I do not get the graph what i expect. Is this problem something about plot options? > Hi Sinan, Knowing neither what you got nor what you expected, I still hope that the following lines will be helpful: In[1]:= Clear[f] f[x] = x/x Out[2]= 1 In[3]:= (* Error messages and empty graph *) Plot[f[x], {x, -2, 2}]; In[5]:= (* A straight line *) Plot[1, {x, -2, 2}]; In[7]:= Clear[f] f[x_] = 1 (* A straight line *) Plot[f[x], {x, -2, 2}]; Out[8]= 1 In[11]:= Clear[f] f[x_] := 1 (* A straight line *) Plot[f[x], {x, -2, 2}]; In[15]:= Clear[f] f[x_] := x/x (* A jagged line *) Plot[f[x], {x, -2, 2}]; (* A less jagged line *) Plot[f[x], {x, -2, 2}, PlotPoints -> 50]; (* A straight line *) Plot[Evaluate[f[x]], {x, -2, 2}]; Best regards, Jean-Marc