Mathematica has a very convenient method for graphing implicit functions. the function ContourPlot can plot implicit functions as well as contours of surfaces. The following code defines a function that for every input value P, outputs a printable graph of…