1
$\begingroup$

I have a complex expression. Where the variable(s) is(are) real. Even after specifying that the variables are real, it doesn't seem to affect the result. Here k is real, but the expression comes like.

H12[k_] = {{-(1/4) Sqrt[-E^(
    2 I k)] (4 π - Arg[E^(I k)/Sqrt[-E^(2 I k)]] - 
     Arg[E^(-I k) Sqrt[-E^(2 I k)]]) Conjugate[Sqrt[-E^(2 I k)]], (
  I E^(I k) (Arg[E^(I k)/Sqrt[-E^(2 I k)]] - 
     Arg[E^(-I k) Sqrt[-E^(2 I k)]]))/(
  4 Sqrt[-E^(2 I k)])}, {1/4 I E^(
   I k) (Arg[E^(I k)/Sqrt[-E^(2 I k)]] - 
     Arg[E^(-I k) Sqrt[-E^(2 I k)]]) Conjugate[Sqrt[-E^(2 I k)]], 
  1/4 (-4 π + Arg[E^(I k)/Sqrt[-E^(2 I k)]] + 
     Arg[E^(-I k) Sqrt[-E^(2 I k)]])}};
DH12[k_] = FullSimplify[D[H12[k],k]; 

In the result you get Derivative[1][Conjugate] and Derivative[1][Abs]. Eventhough, k is real. Is there a way to get out of it. Later, I need to integrate the expression with some other functions because of this problem ,I am not able to do that. Even if I try integrating it just goes on for running..

Simplify[DH12[k], {k, z} ∈ Reals], {k, -π, π}]

After sometime the result comes out symbolically,
\!\(\*SubsuperscriptBox[\(∫\), \(-π\), \(π\)] \*FractionBox[\(1\), \(4\)]\(\ \)\)...

$\endgroup$
  • $\begingroup$ How did you generate this matrix? It seems to be real but this is not obvious since you have entries like Conjugate[Sqrt[-E^(2 I k)]], which is complex even for real k. $\endgroup$ – kiara Oct 20 '17 at 12:23
  • $\begingroup$ @Fabian This bit is from a code(working on it). Is there a way to avoid such Derivative[1][Conjugate] get some answer out of it. $\endgroup$ – L.K. Oct 20 '17 at 12:25
  • $\begingroup$ I dont know what you mean by Derivative[1][Conjugate] where do you see this? $\endgroup$ – kiara Oct 20 '17 at 12:35
  • $\begingroup$ I see this matrix: $$\left( \begin{array}{cc} -\frac{1}{4} i \left(-\arg \left(\frac{e^{i k}}{\sqrt{-e^{2 i k}}}\right)-\arg \left(e^{-i k} \sqrt{-e^{2 i k}}\right)+4 \pi \right) \left(e^{-2 \Im(k)}-e^{2 i k} \text{Conjugate}'\left(\sqrt{-e^{2 i k}}\right)\right) & 0 \\ \frac{e^{i k-2 \Im(k)} \left(\arg \left(\frac{e^{i k}}{\sqrt{-e^{2 i k}}}\right)-\arg \left(e^{-i k} \sqrt{-e^{2 i k}}\right)\right) \left(e^{2 i \Re(k)} \text{Conjugate}'\left(\sqrt{-e^{2 i k}}\right)-1\right)}{4 \sqrt{-e^{2 i k}}} & 0 \\ \end{array} \right)$$ $\endgroup$ – kiara Oct 20 '17 at 12:36
  • $\begingroup$ @Fabian Conjugate′ is actually Derivative[1][Conjugate] $\endgroup$ – L.K. Oct 20 '17 at 12:42
2
$\begingroup$
H12[k_] = {{-(1/4) Sqrt[-E^(2 I k)] (4 π - Arg[E^(I k)/Sqrt[-E^(2 I k)]] -
        Arg[E^(-I k) Sqrt[-E^(2 I k)]]) Conjugate[
      Sqrt[-E^(2 I k)]], (I E^(I k) (Arg[E^(I k)/Sqrt[-E^(2 I k)]] - 
         Arg[E^(-I k) Sqrt[-E^(2 I k)]]))/(4 Sqrt[-E^(2 I k)])}, {1/
      4 I E^(I k) (Arg[E^(I k)/Sqrt[-E^(2 I k)]] - 
       Arg[E^(-I k) Sqrt[-E^(2 I k)]]) Conjugate[Sqrt[-E^(2 I k)]], 
    1/4 (-4 π + Arg[E^(I k)/Sqrt[-E^(2 I k)]] + 
       Arg[E^(-I k) Sqrt[-E^(2 I k)]])}};

Plotting indicates that the terms are real and constant.

Plot[Evaluate@Flatten@H12[k], {k, -Pi, Pi},
 PlotStyle -> {{Thick, AbsoluteDashing[{20, 20}]}, {Thick, DotDashed}, 
   AbsoluteDashing[{20, 20}], Dotted},
 Frame -> True, Axes -> False,
 WorkingPrecision -> 20,
 PlotPoints -> 200,
 PlotLegends -> Placed[Automatic, {0.75, 0.5}]]

enter image description here

The constant values are

SeedRandom[0];
Table[H12[RandomInteger[{-10, 10}]] // Simplify // ComplexExpand // 
   Simplify, {20}] // Union

(* {{{-π, -(π/4)}, {-(π/4), -π}}} *)

EDIT: Or using rationalized random reals

SeedRandom[0];
Table[H12[RandomReal[{-10., 10.}] // Rationalize[#, 0] &] // 
     Simplify // ComplexExpand // FullSimplify, {20}] // Union

(* {{{-π, -(π/4)}, {-(π/4), -π}}} *)

For general k, looking at the series expansion

Assuming[Element[k, Reals], order = 50; 
 Map[(Series[#, {k, 0, order}] // Normal) &,
  (H12[k] // ComplexExpand[#, TargetFunctions -> {Re, Im}] & // 
    Simplify), {2}]]

(* {{-π, -(π/4)}, {-(π/4), -π}} *)

The derivatives are zero.

$\endgroup$
  • $\begingroup$ Impressive. Thanks a lot $\endgroup$ – L.K. Oct 20 '17 at 17:03
1
$\begingroup$

You can simplify the expression as H12[k] is actually constant:

H12[k_]={{-π, -π/4}, {(-π/4), -π}}

So the derivatives should be zero.

$\endgroup$
  • $\begingroup$ How to get this result? Thanks $\endgroup$ – L.K. Oct 20 '17 at 13:07
  • $\begingroup$ I just simplified the entries term by term. So e.g. I E^(I k) Conjugate[Sqrt[-E^(2 I k)]] = -1 or "Sqrt[-E^(2 I k)] Conjugate[Sqrt[-E^(2 I k)]] // FullSimplify" which gives E^(-2 Im[k]) so this zero. $\endgroup$ – kiara Oct 20 '17 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.