That will be due to the quick-plot ranges that Mathcad applies for the graph.
If you look at the quickplot tab on the properties menu: Mathcad is plotting this over the range -5 to 5.
for r*cosTheta - no problem
but when you change to 1/r cos theta then there is a 1/0 issue at the mid point.
Changing the quick plot range will allow you to plot a graph but can be tricky to get a correct look.
Regards
Andy