Mathematica Derivative of the Real Part of a Complex Function (Mathematica)

Click For Summary
The discussion centers on a Mathematica code snippet involving differentiation and the real part of a complex expression. The user encounters an unexpected output when differentiating the expression Re[Exp[u + 10*I]] with respect to u, specifically when substituting u with 0.5. The main issue identified is that Mathematica does not automatically assume that the variable u is real, leading to confusion in the output. The suggestion is made that placing Re outside the differentiation operator D would resolve the issue, but the focus remains on understanding Mathematica's handling of variable assumptions in complex expressions.
Swamp Thing
Insights Author
Messages
1,045
Reaction score
775
TL;DR
Why doesn't this work:
D [ Re[ Exp[u + 10*I] ], u ] /. u->0.5
When I type in this:
Code:
D [
      Re[
           Exp[u + 10*I]
        ],
           u
   ]    /.  u->0.5
I get this output:
1584851721030.png


Of course, I could just put the Re outside and the D inside, but it would be nice to know what is wrong with the above. What's with the Re' in the output?
 
Physics news on Phys.org
Mathematica.
 
Mathematica doesn’t know that you intend u to be real.
 
  • Like
Likes RUQIAN and Swamp Thing

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
5
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K