Re: function assignment to list of functions

• To: mathgroup at smc.vnet.net
• Subject: [mg33706] Re: [mg33720] function assignment to list of functions
• From: BobHanlon at aol.com
• Date: Tue, 9 Apr 2002 01:02:36 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```In a message dated 4/8/02 4:20:10 AM, mmorriss at sbcglobal.net writes:

>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.
>

H1[x_, i_Integer] :=

Module[{v},

D[Exp[-v^2/2], {v,i}] /.

{Exp[-v^2/2]->1, v->x}];

Table[H1[x,i], {i,0,5}]

{1, -x, x^2 - 1, 3*x - x^3, x^4 - 6*x^2 + 3, -x^5 + 10*x^3 - 15*x}

H2[x_, i_Integer] :=

Module[{v},

Nest[D[#,v]&, Exp[-v^2/2], i] /.

{Exp[-v^2/2]->1, v->x}];

Table[H1[x,i], {i,0,5}]==Table[H2[x,i], {i,0,5}]

True

Table[H1[2,i], {i,0,5}]==Table[H2[2,i], {i,0,5}]

True

Bob Hanlon
Chantilly, VA  USA

```

• Prev by Date: Re: function assignment to list of functions
• Next by Date: Different Methods inside one package. More details
• Previous by thread: Re: function assignment to list of functions
• Next by thread: RE: function assignment to list of functions