Need help with solve&fsolve with stored equations

06212014, 11:02 PM
(This post was last modified: 06212014 11:03 PM by alexzkter.)
Post: #1




Need help with solve&fsolve with stored equations
As the title says, I'm having a hard time in the attempt of solving stored equations (on Apps).
The equation is P=((R*T)/(xb))(a/x^2) Here's the definition of the needed variables on CAS: In order to store the 3 equations on a Solve app, (a,b and P equations) I also need to define the 'v' as v:=0 so I don't get syntaxis error: fsolve and solve are working if v is an undefined variable. But if I create this variable, I can't solve the equation anymore (fsolve and solve shows [] ) Then...how am I supposed to easily type in solve() on CAS and then copypaste the expression from Solve app or such ??? Thanks in advance 

06222014, 12:02 AM
Post: #2




RE: Need help with solve&fsolve with stored equations
Not easy at all I am afraid.
To get equations into solver, it seems you have to either use Home variables only (A,B, C etc) or first define the equation in CAS then save it using Solve.E1:= . For example You can do the same for the other two equations a and b. Unfortunately, Solver will then require you to create user variables before running the solver. If you go back to CAS, you will then need to delete some or all of the recently created user variables before running solve() or fsolve(). Its a pain and I would avoid the Solver app and stick with CAS solve(), fsolve(). 

06222014, 12:22 AM
Post: #3




RE: Need help with solve&fsolve with stored equations
(06222014 12:02 AM)CR Haeger Wrote: Not easy at all I am afraid. Thanks for the quick reply. I was reading through the forums and saw the shift+Notes method, which doesn't seem to be that much longer in keystrokes (the copypaste part seems longer) and has the benefit of allowing comments. 

06222014, 07:47 AM
Post: #4




RE: Need help with solve&fsolve with stored equations
Bisection can not solve your equation (without precise boundaries), because the root and the singular point 0 are too close. I'm going to improve the solver so that it recognizes your equation is polynomiallike, even if v is assigned.


06222014, 09:41 AM
(This post was last modified: 06222014 09:46 AM by alexzkter.)
Post: #5




RE: Need help with solve&fsolve with stored equations
(06222014 07:47 AM)parisse Wrote: Bisection can not solve your equation (without precise boundaries), because the root and the singular point 0 are too close. I'm going to improve the solver so that it recognizes your equation is polynomiallike, even if v is assigned. Are you sure that's the problem here? I rebooted the virtual calculator so all stored equations and variables are purged, then did the example above again..same result. Typed in only the equation, without the solve/fsolve command, and I get 7000000=Inf Take a look at this example: No matter how close the root is to the singular point 0, fsolve&solve shows proper result unless the variable was previously defined, even if its v:=5 or any other number than 0) 

06222014, 02:33 PM
Post: #6




RE: Need help with solve&fsolve with stored equations
Yes, because if the variable is not assigned, the equation is found to be reducible to a polynomial equation, and proot is called. If the variable is assigned, it is not found to be reducible to a polynomial equation, and bisection is called. That's what I'm going to improve.


« Next Oldest  Next Newest »

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