HP Forums

Full Version: [CRASH] plotfunc() fails
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to get all answers from a Van Der Waals cubic equation.

Here's the definition of variables:
[Image: 2ibe1hk.png]
I defined 'x' too (x:=0)

When trying to plot the following equation on CAS, the hourglass stays there forever.
[Image: 33079rp.png]

Which doesn't happen on it's equivalent form, the standard cubic form:
[Image: 2ivfi3t.png]



Anyway, I just managed to get all 3 answers from both forms of my equation.
There are 4 ways to solve the equation, by using the following sintaxis:
  • With solve
    solve(equation,var)
    solve({equation},{var}) For multiple equations.
  • With fsolve
    fsolve(equation,var)
    fsolve([equation],[var])--> For multiple equations, but this one only shows 1 result in my case.
Can you write your equations in plain text instead of a screenshot?
Like this
P:=7000000.; R:=8.314; T:=423.15; Tc:=369.8; Pc:=41.9*101325;
a:=27*R^2*Tc^2/64/Pc; b:=R*Tc/8/Pc;
plotfunc(R*T/(x-b)-a/x^2-P)
It's much more efficient, because anyone can check quickly by doing a copy/paste, and you are certain we check with the right data.
I just checked on the emulator, it works.
(06-22-2014 05:54 AM)parisse Wrote: [ -> ]Can you write your equations in plain text instead of a screenshot?
Like this
P:=7000000.; R:=8.314; T:=423.15; Tc:=369.8; Pc:=41.9*101325;
a:=27*R^2*Tc^2/64/Pc; b:=R*Tc/8/Pc;
plotfunc(R*T/(x-b)-a/x^2-P)
It's much more efficient, because anyone can check quickly by doing a copy/paste, and you are certain we check with the right data.
I just checked on the emulator, it works.

Yes, I'll do that next time.
I typed in plotfunc(R*T/(x-b)-a/x^2-P) on a note, copy-pasted it on CAS and I still get the hourglass. Even if a and b are declared as you did.
If it does not work on your version of the emulator, and it works on mine, then it probably means some bug has been fixed.
(06-22-2014 02:35 PM)parisse Wrote: [ -> ]If it does not work on your version of the emulator, and it works on mine, then it probably means some bug has been fixed.

I have the latest Rev.6031 ... Tongue
Reference URL's