I was wondering if it is easy to see if a given expression evaluates to a real number in a given domain? Let $f(x,y,z)$ be some function depending on three variables $x,y,z$. I would like to know if $f(x,y,z)$ is real in some domain, e.g., $x > 0, y < 0, \vert z \vert < 1$ or $x > 0, y < 0, z < g(x,y)$ (the last condition on $z$ here just means for a given $x$ and $y$, $z$ must be smaller than the value $g(x,y)$).

I've tried a few things already but it seems I can't get it to work without specifying my variables from the outset (in which case I would then see if the function was real by eye). However, for many different $(x,y,z)$-tuples this becomes tedious and I would like to see if it's possible to see if a function is real for all points in some domain within Mathematica.


f(x,y,z) = PolyLog[2, x*y/z] - PolyLog[2, -x*y/z]

be a typical function I am dealing with.

I tried

Reduce[PolyLog[2, x*y/z] - PolyLog[2, -x*y/z] ∈ Reals && x > 0 && y < 0 && z < 1]

but this system cannot be solved by Reduce. I've also tried

FunctionDomain[PolyLog[2, x*y/z] - PolyLog[2, -x*y/z], {x, y, z}, Reals]

but it did not help either. I am using version 11.1.1.

  • 2
    $\begingroup$ You can try FunctionDomain and see if it works for you. $\endgroup$
    – Nasser
    Jul 11 '20 at 11:51
  • $\begingroup$ @Nasser Thank you. I have tried this and I get the error 'Unable to find the domain with the available methods'. It seems this function FunctionDomain cannot cope with the PolyLog[2,x], which is part of my f(x,y,z). $\endgroup$
    – CAF
    Jul 11 '20 at 12:57
  • $\begingroup$ With version 12.1.1 FunctionDomain[PolyLog[2, x], x] evaluates to x <= 1 $\endgroup$
    – Bob Hanlon
    Jul 11 '20 at 13:38
  • $\begingroup$ @BobHanlon Thanks, I see, I am unfortunately using version 11.1.1 $\endgroup$
    – CAF
    Jul 11 '20 at 15:13
  • 1
    $\begingroup$ First, FunctionDomain[PolyLog[2, x], x, Reals] performs x<1 in version 12.0. Second, this is an empty talk without knowing your f(x,y,z). $\endgroup$
    – user64494
    Jul 11 '20 at 17:25

Just get an overview with RegionPlot3D .

    PolyLog[2, x*y/z] - PolyLog[2, -x*y/z] \[Element] Reals && x > 0 && 
      y < 0 && z < 1, {x, -3, 3}, {y, -3, 3}, {z, -3, 3}, 
PlotPoints -> 100]

enter image description here


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.