Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1992
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1992

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

Search the Archive

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)





  • Prev by Date: ParametricPlot3D
  • Next by Date: Re: function
  • Previous by thread: function
  • Next by thread: Re: function