0
$\begingroup$

I have a matrix mat with expressions involving square-root with complex-conjugation operation which makes the simplification difficult.

mat = {{Conjugate[
 4 (1 + E^(y Sqrt[-4 x^2 + z^2])) x^2 + 
  z (-(1 + E^(y Sqrt[-4 x^2 + z^2])) z + (-1 + E^(
        y Sqrt[-4 x^2 + z^2])) Sqrt[-4 x^2 + z^2])], 
E^(-(1/2)
   y (2 z + Sqrt[-4 x^2 + z^2] + 
   Conjugate[Sqrt[-4 x^2 + z^2]]))}, {E^(-(1/2)
   y (2 z + Sqrt[-4 x^2 + z^2] + Conjugate[Sqrt[-4 x^2 + z^2]])), 
Conjugate[x Sqrt[-4 x^2 + z^2]] + 
 2 I (-1 + E^(1/2 y Sqrt[-4 x^2 + z^2])) }};

How can we instruct Mathematica to do the simplification with following conditions:

Step 1. Replace $x$ by $x+\epsilon$ such that $\epsilon$ is very small and neglect $\epsilon^2$ terms

Step 2. After Step 1, put $z^2 = 4 x^2$ and simplify the result

$\endgroup$

2 Answers 2

1
$\begingroup$

We may do this using a Taylor series. First we write the matrix as a function of eps:

mat = {{Conjugate[
     4 (1 + E^(y Sqrt[-4 x^2 + z^2])) x^2 + 
      z (-(1 + E^(y Sqrt[-4 x^2 + z^2])) z + (-1 + 
            E^(y Sqrt[-4 x^2 + z^2])) Sqrt[-4 x^2 + z^2])], 
    E^(-(1/2) y (2 z + Sqrt[-4 x^2 + z^2] + 
         Conjugate[Sqrt[-4 x^2 + z^2]]))}, {E^(-(1/2) y (2 z + 
         Sqrt[-4 x^2 + z^2] + Conjugate[Sqrt[-4 x^2 + z^2]])), 
    Conjugate[x Sqrt[-4 x^2 + z^2]] + 
     2 I (-1 + E^(1/2 y Sqrt[-4 x^2 + z^2]))}};
f[eps_] = mat /. x -> x + eps;

Then we expand this into a Taylor series (more accurate: Maclaurin series)

f[0] + eps D[f[x1], x1] /. x1 -> 0 // FullSimplify

{{Conjugate[
    4 (1 + E^(y Sqrt[-4 x^2 + z^2])) x^2 + 
     z (-((1 + E^(y Sqrt[-4 x^2 + z^2])) z) + (-1 + E^(
           y Sqrt[-4 x^2 + z^2])) Sqrt[-4 x^2 + z^2])] - (1/
   Sqrt[-4 x^2 + z^2])
   4 eps x (-z - 2 Sqrt[-4 x^2 + z^2] + 
      E^(y Sqrt[-4 x^2 + z^2]) (4 x^2 y + z - 2 Sqrt[-4 x^2 + z^2] + 
         y z (-z + Sqrt[-4 x^2 + z^2]))) Derivative[1][Conjugate][
     4 (1 + E^(y Sqrt[-4 x^2 + z^2])) x^2 + 
      z (-((1 + E^(y Sqrt[-4 x^2 + z^2])) z) + (-1 + E^(
            y Sqrt[-4 x^2 + z^2])) Sqrt[-4 x^2 + z^2])], (1/
  Sqrt[-4 x^2 + z^2])
  E^(-y (z + Re[Sqrt[-4 x^2 + z^2]])) (Sqrt[-4 x^2 + z^2] + 
     2 eps x y (1 + 
        Derivative[1][Conjugate][Sqrt[-4 x^2 + z^2]]))}, {(1/
  Sqrt[-4 x^2 + z^2])
  E^(-y (z + Re[Sqrt[-4 x^2 + z^2]])) (Sqrt[-4 x^2 + z^2] + 
     2 eps x y (1 + Derivative[1][Conjugate][Sqrt[-4 x^2 + z^2]])), 
  1/Sqrt[-4 x^2 + 
    z^2] (2 I (-Sqrt[-4 x^2 + z^2] + 
        E^(1/2 y Sqrt[-4 x^2 + z^2]) (-2 eps x y + 
           Sqrt[-4 x^2 + z^2])) + Abs[-4 x^2 + z^2] Conjugate[x] + 
     eps (-8 x^2 + z^2) Derivative[1][Conjugate][
       x Sqrt[-4 x^2 + z^2]])}
$\endgroup$
0
$\begingroup$
mat = {{Conjugate[
     4 (1 + E^(y Sqrt[-4 x^2 + z^2])) x^2 + 
      z (-(1 + E^(y Sqrt[-4 x^2 + z^2])) z + (-1 + 
            E^(y Sqrt[-4 x^2 + z^2])) Sqrt[-4 x^2 + z^2])], 
    E^(-(1/2) y (2 z + Sqrt[-4 x^2 + z^2] + 
         Conjugate[Sqrt[-4 x^2 + z^2]]))}, {E^(-(1/2) y (2 z + 
         Sqrt[-4 x^2 + z^2] + Conjugate[Sqrt[-4 x^2 + z^2]])), 
    Conjugate[x Sqrt[-4 x^2 + z^2]] + 
     2 I (-1 + E^(1/2 y Sqrt[-4 x^2 + z^2]))}};

step1 = ExpandAll[ComplexExpand[mat] /. x -> (x + ϵ)] /. Power[ϵ, t_] /; t >= 2 :> 0;
step2 = Simplify[step1 /. z^2 :> 4 x^2];

If you remove the ComplexExpand and use FullSimplify you get this:

{{4 Conjugate[x]^2 - Conjugate[z]^2 + 4 Conjugate[ϵ]^2 + 
   Conjugate[
    8 (1 + E^(2 Sqrt[2] y Sqrt[-x ϵ])) x ϵ + 
     2 Sqrt[2] (-1 + E^(
        2 Sqrt[2] y Sqrt[-x ϵ])) z Sqrt[-x ϵ]], 
  E^(-y (z + 2 Sqrt[2] Re[Sqrt[-x ϵ]]))}, {E^(-y (z + 
     2 Sqrt[2] Re[Sqrt[-x ϵ]])), 
  2 I (-1 + E^(Sqrt[2] y Sqrt[-x ϵ])) + 
   2 Sqrt[2] Conjugate[Sqrt[-x ϵ] (x + ϵ)]}}

... and near $\epsilon=0$ this looks like:

step2 /. ϵ -> 0
(**
  {{4 Conjugate[x]^2 - Conjugate[z]^2, E^(-y z)}, {E^(-y z), 0}}
**)
$\endgroup$

Your Answer

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

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