Post Reply 
[CRASH] plotfunc() fails
06-21-2014, 05:01 PM (This post was last modified: 06-21-2014 05:03 PM by alexzkter.)
Post: #1
[CRASH] plotfunc() fails
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.
Find all posts by this user
Quote this message in a reply
06-22-2014, 05:54 AM (This post was last modified: 06-22-2014 07:06 AM by parisse.)
Post: #2
RE: [CRASH] plotfunc() fails
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.
Find all posts by this user
Quote this message in a reply
06-22-2014, 10:01 AM (This post was last modified: 06-22-2014 10:04 AM by alexzkter.)
Post: #3
RE: [CRASH] plotfunc() fails
(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.
Find all posts by this user
Quote this message in a reply
06-22-2014, 02:35 PM
Post: #4
RE: [CRASH] plotfunc() fails
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.
Find all posts by this user
Quote this message in a reply
06-22-2014, 06:11 PM (This post was last modified: 06-22-2014 06:12 PM by alexzkter.)
Post: #5
RE: [CRASH] plotfunc() fails
(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
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)