Message Boards Message Boards

0
|
1762 Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Problem with plotting Sign[ ]: unexpected output

Posted 2 years ago
Attachments:
POSTED BY: Ilya Shabat
4 Replies
Posted 2 years ago

Thank you! I even remember reading about this :)

POSTED BY: Ilya Shabat
Posted 2 years ago

Thank you a lot! RegionFunction works perfectly for the square root case. In the second case, I added PlotPoints -> 70 and achieved the desired result.

POSTED BY: Ilya Shabat
Posted 2 years ago

And the function

Sqrt[((1 - 2 y Cos[x])/(1 - y Cos[x]))

is complex for parts of the range plotted. RealSign does not work for complex numbers.

POSTED BY: Rohit Namjoshi

The sign seems to be zero only in a meager set. I would plot directly the value 1 with a RegionFunction:

Plot3D[1, {x, 0, 2 \[Pi]}, {y, 1, 5}, 
 RegionFunction -> 
  Function[{x, y}, (1 - 2 y Cos[x])/(1 - y Cos[x]) > 0], 
 PlotPoints -> 50]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract