Re: function
- To: mathgroup at yoda.physics.unc.edu
- Subject: Re: function
- From: alex at fff.chem.utah.edu (Alex Dommasch)
- Date: Mon, 26 Oct 92 17:23:27 MST
> A question about forming functions. Suppose I create a series, using
>
> a=Normal[Series[Sin[x],{x,0,5}]]
>
> giving a = x - x^3/3! + x^5/5!.
>
> I now want to use a to create a function of x, which, functionally,
> is
>
> f[x_]:=a.
>
> This will not work in practice. Is there a way to do this? For
> something short, as in this example
>
> -r. kline
> rvk at blink.att.com
How about:
In[1]:=
f[x_] := Normal[Series[Sin[x], {x, 0, 5}]]
In[2]:=
f[y]
Out[2]=
3 5
y y
y - -- + ---
6 120
--
D. A. (Alex) Dommasch, Programmer
Field-Flow Fractionation Research Center
Department of Chemistry, University of Utah
Salt Lake City, Utah 84112
(801)581-7168 FAX: (801)581-4353
alex at fff.chem.utah.edu (NeXT Mail)