       Re: Plotting numerical derivatives

• To: mathgroup at smc.vnet.net
• Subject: [mg53922] Re: Plotting numerical derivatives
• From: Paul Abbott <paul at physics.uwa.edu.au>
• Date: Fri, 4 Feb 2005 04:11:17 -0500 (EST)
• Organization: The University of Western Australia
• References: <ctnik9\$f0e\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```In article <ctnik9\$f0e\$1 at smc.vnet.net>, "plizak" <plizak at gmail.com>
wrote:

> I'm trying to differentiate a function of the form
>
> FTD[t1_, t2_] := a function of t1 and t2
>
> I can get the derivative fine by using:
> ND[ND[Fun[t1, t2 ], {t1, 1}, 200000], {t2, 1}, 200000 ]

To require ND in NumericalMath`NLimit`, I assume that FTD must be a
functino for which it is difficult or impossible to analytically compute
the derivative? Is this the case? Otherwise you could just enter

Derivative[1, 1][Fun][200000, 200000]

> However, I'd like to plot it in a 3D plot, and it just doesn't want to
> work.  I get a flat plot with value 0.  The code I tried to use is:
>
> Plot3D[ND[ND[Fun[t1, t2 ]  , {t1, 1}, a]  , {t2, 1}, b ], {a, 1,
> 500000}, {b, 1, 500000}]
>
> Any tips on getting this to plot would be greatly appreciated!

Plot3D has the HoldAll attribute so you would need to wrap an Evaluate[]
around the first argument.

Cheers,
Paul

--
Paul Abbott                                   Phone: +61 8 6488 2734
School of Physics, M013                         Fax: +61 8 6488 1014
The University of Western Australia      (CRICOS Provider No 00126G)
35 Stirling Highway
Crawley WA 6009                      mailto:paul at physics.uwa.edu.au
AUSTRALIA                            http://physics.uwa.edu.au/~paul

```

• Prev by Date: Re: Nonlinear Fittings: range / boundaries are not working :(
• Next by Date: Re: Re: Simplify problems for checking easy equalities...
• Previous by thread: Plotting numerical derivatives
• Next by thread: Problem with a sum