MathGroup Archive 2004

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

Search the Archive

RealValued functions and their derivatives

  • To: mathgroup at
  • Subject: [mg51461] RealValued functions and their derivatives
  • From: djw1005 at (D.J. Wischik)
  • Date: Sun, 17 Oct 2004 21:49:57 -0400 (EDT)
  • Organization: University of Cambridge, England
  • Sender: owner-wri-mathgroup at

I would be grateful for some help with Alebra`ReIm`. I can declare a
function to be real-valued (for real-valued arguments) by


Then I can ask Mathematica to reason about real and imaginary
parts of expressions involving f -- for example

Im[t] ^= 0;
Im[w] ^= 0;
Re[f[t] Exp[I w]]

(* correctly returns
Cos[w] f[t] *)

In my application, I then want to differentiate f. If I naively ask for

Re[ f'[t] Exp[I w] ]

(* I get
Cos[w] Re[f'[t]] - Im[f'[t]] Sin[w] *)

Of course, if f is real-valued then f' is real-valued, so I only want the
Cos[w] part. If I try to declare f' to be real-valued by


(* I get an error message:
$RecursionLimit::reclim : Recursion depth of 256 exceeded. *)

I obviously haven't worked out the right way to tell Mathematica
that f' is real-valued. Any suggestions? I'm using Mathematica 4.0.
My hack at the moment is to substitute a pure symbol g for f', and to 
declare that g is RealValued. However, since my function has four
arguments and I need derivatives up to order 3, this is very cumbersome.


  • Prev by Date: Re: Re: Sorting a list of pairs on the second elements
  • Next by Date: Re: table format question
  • Previous by thread: Re: Corrupted file
  • Next by thread: Re: RealValued functions and their derivatives