RealValued functions and derivatives
- To: mathgroup@smc.vnet.net
- Subject: [mg10697] RealValued functions and derivatives
- From: Ernesto Rico-Schmidt <ernesto@neneNet.ddns.org>
- Date: Fri, 30 Jan 1998 04:24:33 -0500
- Organization: neneNet.ddns.org
Hello Mathematica Group! I'm having some troubles with some symbolic differential equations that include functions with real and complex parts. I'm marking these functions as RealValued but the mark doesn't seem to remain valid if I apply derivatives to the function. Marking them with RealValued doesn't work, I get a message "Recursion depth of 256 exceeded". (* begin paste *) Mathematica 3.0 for Linux Copyright 1988-96 Wolfram Research, Inc. -- Motif graphics initialized -- In[1]:= <<Algebra`ReIm`; In[2]:= Im[t] ^= 0; In[3]:= RealValued[ux, uy, u1, u2, u3]; Out[3]= {ux, uy, u1, u2, u3} In[4]:= u = 2/3 (Exp[I phi1] u1[t] + Exp[I phi2] u2[t] + Exp[I phi3] u3[t])/. {phi1->0, phi2->2/3 Pi, phi3->4/3 Pi} (2 I)/3 Pi u3[t] 2 (u1[t] + E u2[t] + -----------) (2 I)/3 Pi E Out[4]= ------------------------------------------- 3 In[5]:= u = ExpToTrig[u] 2 u1[t] u2[t] I u2[t] u3[t] I u3[t] Out[5]= ------- - ----- + ------- - ----- - ------- 3 3 Sqrt[3] 3 Sqrt[3] In[6]:= us[t_] := Re[u] + I Im[u]; In[7]:= Re[us[t]] 2 u1[t] u2[t] u3[t] Out[7]= ------- - ----- - ----- 3 3 3 In[8]:= Im[us[t]] u2[t] u3[t] Out[8]= ------- - ------- Sqrt[3] Sqrt[3] In[9]:= Re[D[us[t],t]] Im[u2'[t]] Im[u3'[t]] 2 Re[u1'[t]] Re[u2'[t]] Re[u3'[t]] Out[9]= -(----------) + ---------- + ------------ - ---------- - ---------- Sqrt[3] Sqrt[3] 3 3 3 (* end paste *) Is there any way to convince Mathematica that the derivatives are also real valued? Thanks in advance. Ernesto. -- Ernesto Rico-Schmidt Technology develops from the primitive ernesto@neneNet.ddns.org via the complicated to the simple. http://www.neneNet.ddns.org --- Antoine de Saint-Exupery