Derivative, i.e. D[ ] , of Re [ something ]

  • Context: Mathematica 
  • Thread starter Thread starter Swamp Thing
  • Start date Start date
  • Tags Tags
    Derivative
Click For Summary
SUMMARY

The discussion focuses on differentiating the real part of complex functions using Mathematica and Wolfram Language. Users encountered challenges with the chain rule when applying the derivative operator to the "Re[ ]" function. A solution was provided using the command D[ComplexExpand[Re[f[t]]], t], which successfully differentiates the real part of the exponential function Exp[I*t] to yield -Sin[t]. This method allows for elegant and automatic differentiation without manual reformulation.

PREREQUISITES
  • Familiarity with Mathematica 12.3 syntax and functions
  • Understanding of complex numbers and their representations
  • Knowledge of differentiation rules, particularly the chain rule
  • Experience with the ComplexExpand function in Mathematica
NEXT STEPS
  • Explore advanced differentiation techniques in Mathematica
  • Learn about the ComplexExpand function and its applications
  • Investigate the implications of the chain rule in complex analysis
  • Study the behavior of real and imaginary parts of complex functions
USEFUL FOR

Mathematics students, researchers in complex analysis, and users of Mathematica looking to enhance their skills in differentiating complex functions.

Swamp Thing
Insights Author
Messages
1,047
Reaction score
775
TL;DR
Wolfram tries to apply the chain rule and gets stuck simplifying Re'[something]
Consider these two examples:
D[ Re[ Exp[ I*t ] ], t ]
1636515381176.png


D[Re[Exp[I*t]],t] /. t-> 0.5
1636515439574.png


Mathematica seems to get stuck differentiating the "Re[ ]" function after (rather naively) applying the chain rule. This is a trivial example, but we might have a more complicated function defined like :-
myFn [ t _ ]:= Re [(* stuff *)]
... and we would like to find D [ myFn [ t ] ], t] without extra manual reformulation.

How can we do that elegantly and automatically?
 
Last edited:
Physics news on Phys.org
Can either Wolfram or Mathematica do the calculation in two steps? I.e., by first calculating ##Re(e^{it})## and then differentiating that result?
Either of these should be able to simplify ##Re(e^{it})##, which is just ##\cos(t)##.
 
  • Like
Likes   Reactions: member 428835 and jim mcnamara
Mark44 said:
Can either Wolfram or Mathematica do the calculation in two steps? I.e., by first calculating ##Re(e^{it})## and then differentiating that result?
Either of these should be able to simplify ##Re(e^{it})##, which is just ##\cos(t)##.
I'd do it like this, which worked for me, giving the desired output ##-\sin(t)##:

f[t_] = Exp[I t];
D[ComplexExpand[Re[f[t]]], t]
 
  • Informative
Likes   Reactions: Swamp Thing

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 10 ·
Replies
10
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K