Re: Real/Comlex function problem with D

*To*: mathgroup at smc.vnet.net*Subject*: [mg74242] Re: Real/Comlex function problem with D*From*: "dimitris" <dimmechan at yahoo.com>*Date*: Thu, 15 Mar 2007 05:03:26 -0500 (EST)*References*: <et8e29$pqb$1@smc.vnet.net>

On Mar 14, 11:08 am, b... at ANTYSPAM.ap.krakow.pl wrote: > Hi, > I have a complex function F[x] > When i defined: > ff[x_]:=Arg[F[x]] (* i tried ComplexExpand[Arg[F[x]]] too *) > > I obtainned good Plot[ff[x]] - its real - (no complex) > > When i try > ff1[x_]:=D[ff[x],x]; > I found ff1 is Complex funtion again !! > > Why ? > > (i tried Evaluate; Element[x,Reals]; FullSimplify - always the same) > > Regards, Olaf Is it a particular reason that the derivative of Arg[F[x]] should not be complex? Print["a complex function"] F[x_] = x*Exp[3*I*x] Print["the argument of the complex function"] ff[x_] = Arg[F[x]] Print["plots of the real and imaginary\npart of the complex function \nalong with plot of the argument"] Show[GraphicsArray[Block[{$DisplayFunction = Identity}, (Plot[#1[F[x]], {x, 0, 2*Pi}, PlotLabel -> #1[F[x]]] & ) /@ {Re, Im}]], ImageSize -> 400]; Show[Block[{$DisplayFunction = Identity}, (Plot[ff[x], {x, #1[[1]], #1[[2]]}] & ) /@ Partition[Range[0, 2*Pi, Pi/3], 2, 1]], Axes -> False, Frame -> {True, True, False, False}, ImageSize -> 200, PlotLabel -> ff[x]]; Print[StyleForm["note the finite discontinuities at n*Pi/3", FontColor -> Red]] Print["the derivative of Arg[F[x]] is complex function"] ff1[x_] = D[ff[x], x] Print["the real and the imaginary part"] (ComplexExpand[#1[D[ff[x], x]]] & ) /@ {Re, Im} Print["the plots of them\nred\[Implies]Re, blue\[Implies]Im"] Plot[Evaluate[%%], {x, 0, 2*Pi}, PlotStyle -> {Red, Blue}]; Best Regards Dimitris P.S. The result from Arg[z] is always between -Pi and Pi. Arg[z] has a branch cut discontinuity in the complex z plane running from -Infinity to 0. Copy paste the following to a notebook Cell[TextData[ButtonBox["Arg from www.functions.wolfram.com", ButtonData:>{ URL[ "http://functions.wolfram.com/ComplexComponents/Arg/";], None}, ButtonStyle->"Hyperlink"]], "Text"] select the cell and press Shift+Ctrl+E Then with your mouse click the the hyperlink to go to a relevant web page for more information.