# How to integrate functions involving logrithm

I have functions

   f= 1/8 E^(-I \[Phi]) (2 E^(
I \[Phi]) (1 + x^2 + \[Lambda]^2 +
2 x \[Lambda] Cos[\[Theta]] Sin[t]^2) +
2 x \[Lambda] Cos[t] Sin[\[Theta]] +
2 E^(2 I \[Phi])
x \[Lambda] Cos[
t] Sin[\[Theta]] - \[Sqrt](E^(
2 I \[Phi]) (-(x^4 -
2 x^2 (-1 + \[Lambda]^2) + (1 + \[Lambda]^2)^2) Sin[
2 t]^2 +
4 (1 + x^2 + \[Lambda]^2 +
2 x \[Lambda] (Cos[\[Theta]] Sin[t]^2 +
Cos[t] Cos[\[Phi]] Sin[\[Theta]]))^2)))


and

 g=1/8 E^(-I \[Phi]) (2 E^(
I \[Phi]) (1 + x^2 + \[Lambda]^2 +
2 x \[Lambda] Cos[\[Theta]] Sin[t]^2) +
2 x \[Lambda] Cos[t] Sin[\[Theta]] +
2 E^(2 I \[Phi])
x \[Lambda] Cos[
t] Sin[\[Theta]] + \[Sqrt](E^(
2 I \[Phi]) (-(x^4 -
2 x^2 (-1 + \[Lambda]^2) + (1 + \[Lambda]^2)^2) Sin[
2 t]^2 +
4 (1 + x^2 + \[Lambda]^2 +
2 x \[Lambda] (Cos[\[Theta]] Sin[t]^2 +
Cos[t] Cos[\[Phi]] Sin[\[Theta]]))^2)))


I tried to integrate $$-fLog[2,f]-gLog[2,g]$$, with respect to $$\theta$$ and $$\phi$$ such that $$0 \le \theta \le \pi$$ and $$0 \le \phi \le 2 \pi$$. However, it does not show the answer, rather it gives the expressions back with integral signs $$\int_\theta \int_\phi$$.

Kindly help to resolve the issue. Thanks.

• You should really show the exact code you used for the integration, however If your syntax is correct, that means that Mathematica does not know the answer. Perhaps an analytical answer may not even exist. May 15, 2020 at 16:10

Maybe this will get you started:

f[x_] := Sin[x];
Integrate[f[x] Log[2, f[x]], x]


If you want the definite integral:

Integrate[f[x] Log[2, f[x]], {x, 0, 2 Pi}]


I would suggest starting here and slowly making your function more complicated/realistic. At some point the integration may fail and then you will know where the problem lies.