3
$\begingroup$

I have the following command:

RegionPlot3D[
  Log[p1/(1 + p2)] > 0, {p1, 0, 0.5}, {p2, 0.5, 1}, {C, 0, 1}]

and my Mathematica 9 gave me the following error message:

RegionPlot3D::boolf: "Log[p1/(1+p2)]>0 must be a Boolean function."

I have no idea why Log[p1/(1+p2)]>0 is not a Boolean function. It just looks like an innocent inequality that should work in RegionPlot3D.

Note: I have simplified the inequality so it does not involve C, but in the original version it does contain C.

$\endgroup$
1
  • $\begingroup$ I think that's because your p1 begin with 0, where the Log[p1/(1 + p2)] is undefined. Try TrueQ[Log[p1/(1 + p2)] > -2]. $\endgroup$
    – Silvia
    Commented Jun 19, 2013 at 6:41

1 Answer 1

11
$\begingroup$

I think that's because your p1 begin with 0, where the Log[p1/(1 + p2)] is undefined. You could set the start point a little greater than 0, or you could try TrueQ[Log[p1/(1 + p2)] > -2], which will give False for any case that it's argument is not explicit True.

btw. You should not use C, which is a system reserved function, as your variable name.

$\endgroup$
3
  • 1
    $\begingroup$ Similarly, avoid K which does not have its own doc page, but shows up via ?K. $\endgroup$
    – rcollyer
    Commented Jun 19, 2013 at 14:14
  • $\begingroup$ @rcollyer Thanks! Didn't know that! I generally avoid any symbol names begin with upper-case. $\endgroup$
    – Silvia
    Commented Jun 19, 2013 at 15:54
  • $\begingroup$ It's good advice. I tend to ignore it, especially for my own packages. To me a packaged function needs to be capitalized. $\endgroup$
    – rcollyer
    Commented Jun 19, 2013 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.