Re: real valued function from complex
- To: mathgroup at smc.vnet.net
- Subject: [mg37405] Re: [mg37354] real valued function from complex
- From: Andrzej Kozlowski <andrzej at platon.c.u-tokyo.ac.jp>
- Date: Sat, 26 Oct 2002 02:04:29 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
It seems to me that: Plot[Evaluate[{Re[D[Zeta[1/ 2 + I*t], t]], Re[Zeta[1/2 + I*t]]}], {t, 0, 40}, PlotStyle -> {RGBColor[ 1, 0, 0], RGBColor[0, 0, 1]}] should give you what you want? Andrzej Kozlowski Yokohama, Japan http://www.mimuw.edu.pl/~akoz/ http://platon.c.u-tokyo.ac.jp/andrzej/ On Friday, October 25, 2002, at 03:46 PM, strgh at mimosa.csv.warwick.ac.uk () wrote: > I want to define a real-valued function f[t_] from the > values of a complex-valued function on a line parametrised > by t, and then be able to handle f like any other real > function (differentiate it etc.) > > A cute example is: > > Clear[rz, drz]; > rz[t_] := Re[Zeta[1/2 + I*t]]; > drz[t_] := D[rz[t], t] (* the sort of thing I want to do *) > > so that > > Plot[{drz[t], Im[Zeta[1/2 + I*t]]}, {t, 0, 40}, > PlotStyle -> {RGBColor[1, 0, 0], RGBColor[0, 0, 1]}] > > will work (it doesn't). > I can get a quick & dirty numerical approximation in this case > (including, as a reality check, the original function I'm > differentiating) using something like > > Clear[rz, iz, rztable, plotzeta]; > rz[t_] := Re[Zeta[1/2 + I*t]]; > iz[t_] := Im[Zeta[1/2 + I*t]]; > rztable[tmin_, tmax_] := > Table[{t, rz[t]}, {t, tmin, tmax, (tmax - tmin)/50}]; > plotzeta[tmin_, tmax_] := Module[{rzapprox}, > rzapprox = Interpolation[rztable[tmin, tmax]]; > Plot[{rzapprox'[t], rz[t], iz[t]}, {t, 0, 40}, > PlotStyle -> {RGBColor[1, 0, 0], RGBColor[0, 1, 0], > RGBColor[0, 0, 1]}] > ] > > plotzeta[0, 40] > > However I'd prefer to leave the numerical approximations > till the last minute (i.e. plotting), and the interpolation > table would need tweaking on a case-by-case basis. > Any other suggestions? (sorry if there is an "obvious" answer). > -- Ewart Shaw > -- > J.E.H.Shaw [Ewart Shaw] strgh at uk.ac.warwick TEL: +44 2476 > 523069 > Department of Statistics, University of Warwick, Coventry CV4 7AL, > U.K. > http://www.warwick.ac.uk/statsdept/Staff/JEHS/ > 3 ((4&({*.(=+/))++/=3:)@([:,/0&,^:(i.3)@|:"2^:2))&.>@]^:(i.@[) <#:3 > 6 2 > > >