# Plotting relationship between two variables when their relationship is given by a polynomial

I have the following equation and I want to plot a graph with $$\mathfrak{p}$$ in the $$x$$-axis and $$i$$ in the $$y$$-axis. I don't have a specific range for $$i$$ but I would like to see what happens when $$\mathfrak{p}$$ is in between 0 and 3.

The equation is: $$0.74\mathfrak{p} i^9-0.0045(\mathfrak{p}-13)i^8+7i^7-426\left(\frac{1}{\mathfrak{p}}-0.0065\right)i^6+901i^5-11i^4-(\mathfrak{p}^2+5\mathfrak{p})i+1=0$$

I am new to Mathematica and I am completely lost with this one.

I would also appreciate it if you can tell me how to plot another curve (basically the same equation with different coefficients) on the same graph.

Thank you!

• ContourPlot is work.BTW, you should post the Mathematica code instead of TeX. Commented Jul 3, 2021 at 0:17
• @cvgmt Thanks so much for telling me this. I am new to mathematica.SE and didn't know this Commented Jul 4, 2021 at 1:40

Clear["Global*"]

eqn = 0.74 p*i^9 - 0.0045 (p - 13) i^8 + 7 i^7 - 426 (1/p - 0.0065) i^6 +
901 i^5 - 11 i^4 - (p^2 + 5 p) i + 1 == 0 //
Rationalize // Simplify;

ContourPlot[Evaluate@eqn, {p, 0, 3}, {i, -1, 20},
PlotPoints -> 50,
WorkingPrecision -> 20,
MaxRecursion -> 5,
FrameLabel ->
(Style[#, 12, Bold] & /@ {p, i}),
Epilog -> Inset[ContourPlot[Evaluate@eqn, {p, 0, 1}, {i, -1/2, 1},
PlotPoints -> 50,
WorkingPrecision -> 20,
MaxRecursion -> 5,
FrameLabel ->
(Style[#, 10, Bold] & /@ {p, i})],
{2, 13}]]


The inset with the blowup was added since there was a lot of dead space in the plot.

For multiple equations use ContourPlot[Evaluate@{eqn1, eqn2,...}, ...]`

• Thank you so much! I am new to Mathematica and trying to figure things as I go. This is very helpful! Commented Jul 4, 2021 at 1:41
• I tried using your code to plot a different function of the same sort and Mathematica gives me an error saying that the precision of the argument function is less than WorkingPrecision. I have posted this new function as a seperate question on Mathematica.SE Could you please take a look at this and help me with a code if you have time? Also I'd like to know how to fix that error. Thank you so much! mathematica.stackexchange.com/questions/250541/… Commented Jul 4, 2021 at 3:06