# How to check if an expression is real in some domain

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.

Let

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.

• You can try FunctionDomain and see if it works for you. Jul 11 '20 at 11:51
• @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).
– CAF
Jul 11 '20 at 12:57
• With version 12.1.1 FunctionDomain[PolyLog[2, x], x] evaluates to x <= 1 Jul 11 '20 at 13:38
• @BobHanlon Thanks, I see, I am unfortunately using version 11.1.1
– CAF
Jul 11 '20 at 15:13
• 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). Jul 11 '20 at 17:25