# Integral of complex function

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?

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}]

• Please can you format with Mathematica code so that we can copy and not have to re-write?
– Hugh
Mar 1 at 9:06
• I edited the post and included the Mathematica code. Mar 1 at 9:12
• There might not be an analytical solution. Mar 1 at 14:37

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!

• But integral(Abs(expr)) is much more difficult Mar 1 at 15:37