I am trying to plot polar conics using the PolarPlot function in Mathematica. When I plot a parabola or hyperbola, I get the following errors:

Infinite expression 1/0. encountered.
Indeterminate expression 0. ComplexInfinity encountered.

I understand that obviously division by zero is going to occur, but from my understanding of Mathematica the software should know that it is intended and not an error. Although it is not a fatal error, I was wondering if my doing something incorrectly was causing the error or if that is supposed to happen.

Here is one such function that gives the error:

   {6/(1 - Cos[t])}, 
   {t, 0, 2 Pi}, 
   PlotRange -> {{-3, 20}, {-20, 20}}



I tried to use Exclusions, but with no luck. My supposition is that the issue is using a point that generates a discontinuity as an initial point. If you instead use something like {t,.0001,2 Pi}, it works fine. Once you get too close to 0, it starts to throw the error again, and neither PlotPoints nor PerformanceGoal seem to fix it.

For your function, you could avoid this by taking t from -Pi to Pi, if that's an acceptable solution.

enter image description here

  • 1
    $\begingroup$ Thank you so much for your answer! This definitely worked. $\endgroup$ – chiragzq May 22 at 22:11

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.