0
$\begingroup$

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$$

Can someone please help me with this?

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!

$\endgroup$
2
  • 4
    $\begingroup$ ContourPlot is work.BTW, you should post the Mathematica code instead of TeX. $\endgroup$
    – cvgmt
    Jul 3 '21 at 0:17
  • $\begingroup$ @cvgmt Thanks so much for telling me this. I am new to mathematica.SE and didn't know this $\endgroup$
    – timothy
    Jul 4 '21 at 1:40
1
$\begingroup$
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}]]

enter image description here

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,...}, ...]

$\endgroup$
2
  • $\begingroup$ Thank you so much! I am new to Mathematica and trying to figure things as I go. This is very helpful! $\endgroup$
    – timothy
    Jul 4 '21 at 1:41
  • $\begingroup$ 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/… $\endgroup$
    – timothy
    Jul 4 '21 at 3:06

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.