1
$\begingroup$

Consider this expression

f = Abs[ x + I ]

with this assumption

$Assumptions = Element[x, Reals]

Now there is something strange: why are the following derivatives different?

FullSimplify[ComplexExpand[D[f, x]]]
D[ComplexExpand[f, TargetFunctions -> {Re, Im}], x]
(* (I + x)/Sqrt[(I + x)^2] *)
(* x/Sqrt[1 + x^2] *)

Note that the argument of the derivative is the same

FullSimplify[
 ComplexExpand[f, TargetFunctions -> {Re, Im}] == f]
(* True *)
$\endgroup$
2
  • 1
    $\begingroup$ Run Trace on your In[3] inputs to see the order of computations. $\endgroup$
    – corey979
    Nov 8, 2016 at 12:59
  • $\begingroup$ @corey979 So does ComplexExpand work in a wrong way with Abs'[I+x]? $\endgroup$
    – Giancarlo
    Nov 9, 2016 at 13:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.