MathGroup Archive 2009

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

Search the Archive

Re: derivative of a well-behaved function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99631] Re: derivative of a well-behaved function
  • From: m.r at inbox.ru
  • Date: Sun, 10 May 2009 05:12:58 -0400 (EDT)
  • References: <gtrl0i$1mf$1@smc.vnet.net>

Ricardo Samad wrote:
> Dear all,
>
> the following ZS function is an analytical description of the transmittance
> of a laser beam through an Iris after propagating inside a nonlinear sample
> (Z-Scan curve):
>
> \[Gamma][z_, z0_] := 1/2 (I/z0 (z + (z^2 + z0^2)/(DD - z)) + 1);
>
> ZS[z_, z0_, \[Phi]_] :=
>   Abs[\[Gamma][z, z0] Gamma[\[Gamma][z, z0], 0,
>      I \[Phi]/(1 + (z/z0)^2)] /(I \[Phi]/(1 + (z/z0)^2))^\[Gamma][z,
>      z0]]^2;
>
> Altough the function has imaginary arguments and is defined in terms of the
> incomplete Gamma function, it is well-behaved and Mathematica calculates an=
> d
> plots it without problems:
>
> DD = 300;
> Plot[ZS[z, 1, 0.5], {z, -4, 4}]
>
> The problem is that when I calculate its derivative in z, the result is
> given in terms of infinite quantities and DirectInfinity functions, and it
> is not possible to get numerical values of it neither plot its graph:
>
> dZS = D[ZS[z, 1, 0.5], z];
> dZS /. z -> 1
> N[%]
> Plot[dZS[z, 1, 0.5], {z, -4, 4}]
>
> Since the ZS function is well-behaved and has no discontinuities, its
> derivative should be easily evaluated to numerical values and also plotted.
> Does anybody has any idea on how to obtain the values? (I could easily writ=
> e
> a function to numerically calculate the derivative, but that=B4s not really
> what I want).
>
> Thank you,
>
> Ricardo
>

Essentially you want to compute a directional derivative of f[g[z]]
with g analytic and f non-analytic, where f == Abs and the direction
vector z0 == 1. Then (making up the notation as we go along)

D[f[g[z]], z, Direction -> z0] ==
  g'[z]*D[f[w], w, Direction -> z0*g'[z]] /. w -> g[z]

which is a generalization of the chain rule. This gives the exact
symbolic expression for the derivative of ZS:

dAbs[z_, z0_] = Limit[(Abs[z + z0*h] - Abs[z])/(z0*h), h -> 0] //
  FullSimplify

dZS[z_] = D[(90001 E^((Pi + 300 Pi z)/(
       600 - 2 z)) (1 + z^2)^2 Abs[
        Gamma[((150 + I/2) (1 + I z))/(300 - z)] -
         Gamma[1/2 (1 + I (z + (1 + z^2)/(300 - z))), I/(
          2 (1 + z^2))]]^2)/(2 (300 - z)^2), z] /.
     Abs'[w_] :> dAbs[w, D[w, z]] /.
    w_MeijerG :> FunctionExpand@ w //
   Quiet@ Simplify[#, TimeConstraint -> .1]&;

Plot[dZS[z], {z, -4, 4}, PlotRange -> All]

Maxim Rytin
m.r at inbox.ru


  • Prev by Date: Re: copy and paste to other programs
  • Next by Date: Re: ColorFunction on a linux system (xorg) loses graphics
  • Previous by thread: Re: derivative of a well-behaved function
  • Next by thread: Re: Re: derivative of a well-behaved function