Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*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 2002

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

Search the Archive

RE: function assignment to list of functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33725] RE: [mg33720] function assignment to list of functions
  • From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>
  • Date: Wed, 10 Apr 2002 00:49:06 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

> -----Original Message-----
> From: Mark Morrissey [mailto:mmorriss at sbcglobal.net]
To: mathgroup at smc.vnet.net
> Sent: Tuesday, April 09, 2002 7:04 AM
> Subject: [mg33725] [mg33720] [mg33720] function assignment to list of functions
> 
> 
> 
> Hi Folks - I have an alternative form of the set Hermite 
> polynomials I'd 
> like to use.  They are defined differently than the 
> mathematica function 
> HermiteH.  Unfortunately, the recursive generating function takes way 
> too long.  I can generate a list of these functions using the 
> different 
> order derrivatives of the gaussian PDF (that's how they're defined):
> 
> {1, -x, -1 + x^2, -x(-3 + x^2) .... }
> 
> 
> But I don't seem to be able to assign each function to H[x_,i_]:=   
> where i is the index from 0 to the number of functions in the list.
> 
> Any ideas??
> 
> Thanks in advance.
> 
> Regards - Mark
> Mark Morrissey
> Unv of Oklahoma
> Norman, Oklahoma 73026
> 

Mark,

I do not know what you want to achieve, in general I'd avoid doing that,
because:

(1) you'll loose all predefined transformation rules and simplifications
associated with the Hermite Polynomes, and

(2) you'll also loose the programmed, optimized numerical function
evaluation for them.


To answer your question regarding the function definition, see:

In[1]:= (ff = Table[HermiteH[n, z], {n, 0, 10}]) // TableForm
Out[1]//TableForm=
   1
   2*z
   -2 + 4*z^2
   -12*z + 8*z^3
   12 - 48*z^2 + 16*z^4
   120*z - 160*z^3 + 32*z^5
   -120 + 720*z^2 - 480*z^4 + 64*z^6
   -1680*z + 3360*z^3 - 1344*z^5 + 128*z^7
   1680 - 13440*z^2 + 13440*z^4 - 3584*z^6 + 256*z^8
   30240*z - 80640*z^3 + 48384*z^5 - 9216*z^7 + 512*z^9
   -30240 + 302400*z^2 - 403200*z^4 + 161280*z^6 - 23040*z^8 + 1024*z^10

In[2]:= 
(myHerms[#2, z_] := #1) & @@@ Transpose[{ff, Range[Length[ff]] - 1}];

In[3]:= myHerms[5, x]
Out[3]= 120*x - 160*x^3 + 32*x^5

Hope that helps

--
Hartmut Wolf



  • Prev by Date: Re: Different Methods inside one package. More details
  • Next by Date: Seminar on Computational VaR using Mathematica
  • Previous by thread: Re: function assignment to list of functions
  • Next by thread: list of digits to string