MathGroup Archive 2006

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

Search the Archive

Re: Making plots using transformation rules

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71942] Re: Making plots using transformation rules
  • From: Bill Rowe <readnewscix at earthlink.net.invalid>
  • Date: Tue, 5 Dec 2006 06:04:40 -0500 (EST)
  • References: <el128e$5h8$1@smc.vnet.net>

In article <el128e$5h8$1 at smc.vnet.net>, amannuc at yahoo.com wrote:

> I've read about making plots of functions, for example:

> Plot[Evaluate[f[x]], {x, 0, 10}]
 
> I don't have this sort of function to plot. Because it involves
> derivatives, I only get numerical output after defining a
> transformation rule. A simple example (not the real one) is the
> following:
 
> g[t_] := D[t^2, t]
> g[t] /. t -> 1
 
> I cannot evaluate g[1], because then Mathematica thinks I am trying to
> take a derivative with respect to the number 1, and flags that as
> error. So I need the transformation rule to get function values.
 
> What is the best way to plot g[t]?

Probably the simplest way to do what you want would be to symbolically 
evaluate g[t] and plot the resulting expression, i.e.,

In[1]:=g[t_]:=D[t^2,t]
In[2]:=f=g[x]
Out[2]=2 x

In[3]:=Plot[f,{x,0,2}];

-- 
To reply via email subtract one hundred nine


  • Prev by Date: how many times nestwhile repeats calculations?
  • Next by Date: Re: Using FindRoot in complex funtion
  • Previous by thread: Making plots using transformation rules
  • Next by thread: Re: Making plots using transformation rules