1
$\begingroup$

How to compute a complicated complex integral? You can see the example in the figure. I set assumptions that all constants are positive and real, then I try to integrate the $pel(z)$ expression but Mathematica does not calculate it. It even seems that Mathematica does not take into account the fact that the variables are real...

Is it feasible for Mathematica to solve such expressions? Or is this impossible to solve analytically?

enter image description here

In: $Assumptions = {a > 0 && k > 0 && c > 0 && d > 0 && e > 0 && L > 0 && V > 0 && z > 0}
In: pel[z_] := (e^2 E^(-2 (a + I k) z) (-1 + E^((a + I k) z)) (-E^(d (a + I k)) + 
   E^((a + I k) z)) (-E^(d (a + I k)) + E^(
   2 (a + I k) z)) V^2)/(c (1 + E^(d (a + I k)))^2 (a + I k) L^2)
In: Integrate[Abs[pel[z]], {z, 0, d}]
$\endgroup$
3
  • 1
    $\begingroup$ Please can you format with Mathematica code so that we can copy and not have to re-write? $\endgroup$ – Hugh Mar 1 at 9:06
  • $\begingroup$ I edited the post and included the Mathematica code. $\endgroup$ – Frederic Mar 1 at 9:12
  • $\begingroup$ There might not be an analytical solution. $\endgroup$ – Mariusz Iwaniuk Mar 1 at 14:37
3
$\begingroup$

This is your expression:

expr = (e^2 E^(-2 (a + I k) z) (-1 + 
      E^((a + I k) z)) (-E^(d (a + I k)) + 
      E^((a + I k) z)) (-E^(d (a + I k)) + 
      E^(2 (a + I k) z)) V^2)/(c (1 + E^(d (a + I k)))^2 (a + 
      I k) L^2);

Let us expand it and integrate it term-by-term:

Map[Integrate[#, {z, 0, d}] &, Expand[expr]]

(*   0   *)

So, the result is zero.

Have fun!

$\endgroup$
1
  • $\begingroup$ But integral(Abs(expr)) is much more difficult $\endgroup$ – Andreas Mar 1 at 15:37

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.