RE: Using the Normal Distribution in Maxima



Ah great. Many thanks, Tolga

This material is sales and trading commentary and does not constitute investment research.  Please follow the attached hyperlink to an important disclaimer http://www.csfb.com/legal_terms/disclaimer_europe.shtml

-----Original Message-----
From: Robert Dodier [mailto:robert.dodier at gmail]
Sent: 07 September 2005 14:54
To: Uzuner, Tolga
Cc: maxima@math.utexas.edu
Subject: Re: [Maxima] RE: Using the Normal Distribution in Maxima


hello tolga,

> Can I do the following:
> 
> - define a function myself, just simply called N(x)
> - tell Maxima that dN=n, i.e. that if it encounters N during differentiation,
> it should just return n
> - and then differentiate as below
> 
> Maxima doesn't have to know what N is (i.e. for example that
> N(x)=1/2 erf(x/sqrt(2)) .

you can use the gradef function to define the derivative of N ...

(%i1) gradef (N(x), dN(x));
(%o1) N(x)
(%i2) diff (N(f(x)), x);
(%o2) dN(f(x))*'diff(f(x),x,1)

it is not necessary to define N before using it in an expression.

if at some later stage you want to substitute the definition of dN,
you could do dN (x) := exp (-x^2/2)/sqrt(2 * %pi);  ''%o2;
(note the presence of two single quote marks '' in front of %o2 --
that means to re-evaluate %o2.)

hope this helps,
robert dodier

==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

==============================================================================