Maxima Plugin - Messages
#1 Posted: 12 years ago
The Maxima plugin is an interface between SMath Studio and the free and open source computer algebra program Maxima.
There is an English handbook for the plugin: https://doi.org/10.25933/OPUS4-2949

There is an English handbook for the plugin: https://doi.org/10.25933/OPUS4-2949
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
7 users liked this post
Radovan Omorjan 12 years ago, Viktor a year ago, Andrey Ivashov 6 years ago, IVR 12 years ago, ioan92 12 years ago, Davide Carpi 12 years ago, Вячеслав Мезенцев 12 years ago
#2 Posted: 12 years ago
I'll test this plugin ASAP, seems a huge work 
About variable's definition:
(answer is the RHS)
Best regards,
Davide

About variable's definition:
store.AppendDefinition("varible_name", Term[] answer, new Term[0]);
Best regards,
Davide
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
Martin Kraska 12 years ago
#3 Posted: 12 years ago
Wrote
Due to registring a path to Maxima during setup, SMath is not really portable any more unless you can use the same Maxima path on different systems
[/list]
Thank you very much, Kay and Martin!!
You may want to contact the author of the portable version of Maxima at portableapps.com
http://portableapps.com/node/23391
Some other resources that may help are :
Swig to interface C/C++ with C#
http://en.smath.info/forum/yaf_postsm10783_Cephes-Math-Library.aspx#post10783
SWIG and Common Lisp
http://www.swig.org/Doc1.3/Lisp.html
Simple C++ CAS Maxima API
http://code.google.com/p/remote-maxima/
C# code to connect to Maxima
http://www.math.utexas.edu/pipermail/maxima/2009/016554.html
1 users liked this post
Martin Kraska 12 years ago
#4 Posted: 12 years ago
Many thanks to Kay and Martin
I really enjoyed browsing the Martin's Handbook with Maxima examples. I can see there are some problems with localization settings, (point, coma <=versus=> coma, semicolon). I had no problems with the Maxima examples until I changed to point as decimal point, and coma as argument separator - see the picture please.
[albumimg]295[/albumimg]
I did not see this in the ToDo list or Known Issues (maybe I am wrong).
On the other hand, I suppose that something could be done in order to make this "portable" as kilele mentioned. I know there is software which include some Maxima support but there is not need to install Maxima at all.
Regards,
Radovan

I really enjoyed browsing the Martin's Handbook with Maxima examples. I can see there are some problems with localization settings, (point, coma <=versus=> coma, semicolon). I had no problems with the Maxima examples until I changed to point as decimal point, and coma as argument separator - see the picture please.
[albumimg]295[/albumimg]
I did not see this in the ToDo list or Known Issues (maybe I am wrong).
On the other hand, I suppose that something could be done in order to make this "portable" as kilele mentioned. I know there is software which include some Maxima support but there is not need to install Maxima at all.
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 users liked this post
Martin Kraska 12 years ago
#5 Posted: 12 years ago
Maxima-diff() seems to trouble functions from Nonlinear Solvers. I hope this can be fixed, or Davide finds a smart way to adjust to it without rewriting everything. Last resort would be to provide the functions directly based on Maxima. First we should try to fix diff().

Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#6 Posted: 12 years ago
In principle, the arg and dec sep issue as well as function style was meant to be handled, but to be honest - not tested. Should be possible to fix, as proven by many other plugins. The localization issue is quite top on the agenda.
@Andrey, is there a generic solution coming up soon or should we cope on our own for the time being?
As to the portable version. Honestly, I would rather focus on convenient and stable operation rather than on installation issues. If non-portability turns out to be prohibitive for otherwise active users, this, of course, should be handled.
But be aware that Maxima is as big as 30MB in download and 100MB unpacked.
We also think of generic unicode support (as extension of the translator function) in order to enable e.g. cyrillic letters in expressions.
Let us know what the priorities are for you.
@Andrey, is there a generic solution coming up soon or should we cope on our own for the time being?
As to the portable version. Honestly, I would rather focus on convenient and stable operation rather than on installation issues. If non-portability turns out to be prohibitive for otherwise active users, this, of course, should be handled.
But be aware that Maxima is as big as 30MB in download and 100MB unpacked.
We also think of generic unicode support (as extension of the translator function) in order to enable e.g. cyrillic letters in expressions.
Let us know what the priorities are for you.
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#7 Posted: 12 years ago
Plugin updated. Now Maxima should be started whenever required (this formerly failed at least for int())
EDIT: Update did just hide the problem, but did not solve it.
EDIT: Update did just hide the problem, but did not solve it.
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#8 Posted: 12 years ago
To create a Taylor series in a SMath worksheet one can write:
[MATH eng]Taylor(f(x),x.0,degree):line(T(z):sum((diff(f(z),z,n)*{(x-z)^n}/{n!}),n,0,degree),T(x.0),2,1)[/MATH]
Working from the plugin, NonlinearSolvers build the T(z) RHS, call a symbolic calculation and then replace with a C# while all the [MATH eng]z[/MATH] variables with [MATH eng]x.0[/MATH], this is made to leave clean the canvas from internal variables (but maybe there is another way that I don't know or that I've missed)... Maxima probably crashes against the while cycle (but I'm not sure)
[MATH eng]Taylor(f(x),x.0,degree):line(T(z):sum((diff(f(z),z,n)*{(x-z)^n}/{n!}),n,0,degree),T(x.0),2,1)[/MATH]
Working from the plugin, NonlinearSolvers build the T(z) RHS, call a symbolic calculation and then replace with a C# while all the [MATH eng]z[/MATH] variables with [MATH eng]x.0[/MATH], this is made to leave clean the canvas from internal variables (but maybe there is another way that I don't know or that I've missed)... Maxima probably crashes against the while cycle (but I'm not sure)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
Martin Kraska 12 years ago
#9 Posted: 12 years ago
BUG/Dangerous feature:
Currently MaximaLog(), int(), diff(), lim() and sum() do not trigger start of a session!
Maxima must be started explicitly in order to take over the internal functions int(), diff(), lim() and sum().
Maxima session start can be triggered by one of
- any VALID MaximaControl() command (valid command strings are shown in the dynamic assistant)
- Maxima() with any argument accepted by SMath preprocessing
- one of the functions Solve(), LinSolve() or Algsys()
Make sure to re-calculate the document if you started the session by adding such a command into an active document.
This means that documents can behave differently depending on whether Maxima is running or not.
This is a bug/dangerous feature which we try to fix ASAP.
Meanwhile it is safe to stick to the recommendation in "Plugin Maxima.sm": Each document should at least do a cleanup at the beginning. This is to avoid interference between different open files in the same SMath instance and makes sure that Maxima is started. Use optimization> "None" or "symbolic" to see the "done".
MaximaControl("cleanup" )=done
Currently MaximaLog(), int(), diff(), lim() and sum() do not trigger start of a session!
Maxima must be started explicitly in order to take over the internal functions int(), diff(), lim() and sum().
Maxima session start can be triggered by one of
- any VALID MaximaControl() command (valid command strings are shown in the dynamic assistant)
- Maxima() with any argument accepted by SMath preprocessing
- one of the functions Solve(), LinSolve() or Algsys()
Make sure to re-calculate the document if you started the session by adding such a command into an active document.
This means that documents can behave differently depending on whether Maxima is running or not.
This is a bug/dangerous feature which we try to fix ASAP.
Meanwhile it is safe to stick to the recommendation in "Plugin Maxima.sm": Each document should at least do a cleanup at the beginning. This is to avoid interference between different open files in the same SMath instance and makes sure that Maxima is started. Use optimization> "None" or "symbolic" to see the "done".
MaximaControl("cleanup" )=done
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#10 Posted: 12 years ago
Regarding to the starting/closing Maxima session, I have some experience with Maxima sessions in other software, and in SMath it happened the same. Sometimes, we can close SMath, end up with/without SMath crash and one or more "maxima.exe" processes remained opened (we could see and should close them in the Task manager, to avoid further problems). I do not know when this happened and why, just wanted to point out how to avoid some possible troubles.
Regards,
Radovan
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 users liked this post
Martin Kraska 12 years ago
#11 Posted: 12 years ago
killing a process seems to be a bit tricky, the accepted response on this thread could be useful
http://stackoverflow.com/questions/17024729/how-to-kill-process-regardless-whether-its-32-or-64-bit
http://stackoverflow.com/questions/17024729/how-to-kill-process-regardless-whether-its-32-or-64-bit
1 users liked this post
Martin Kraska 12 years ago
#12 Posted: 12 years ago
WroteI can see there are some problems with localization settings, (point, coma <=versus=> coma, semicolon). I had no problems with the Maxima examples until I changed to point as decimal point, and coma as argument separator - see the picture please.
Fixed, plugin updated.
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Radovan Omorjan 12 years ago
#13 Posted: 12 years ago
WroteMaxima-diff() seems to trouble functions from Nonlinear Solvers. I hope this can be fixed, or Davide finds a smart way to adjust to it without rewriting everything. Last resort would be to provide the functions directly based on Maxima.
Maxima now does not overwrite the functions diff(), lim(), int() and sum(), because of the problems sum() and diff() can cause. Thus, we hope that Maxima now won't interfere with existing sheets as long as you do not ask explicitly by MaximaControl("takeover" ).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#14 Posted: 12 years ago
Plugin updated.
Maxima.sm (34 KiB) downloaded 412 time(s).
- pi translation fixed
- sum() works but yet summation variables must be undefined
- logging and control improvements
- translation of scientific number format fixed
- translation of Maxima lists and lists of lists implemented (translated into matrices)
- SVN doc updated
Maxima.sm (34 KiB) downloaded 412 time(s).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#16 Posted: 12 years ago
Plugin updated.
- Expression size limit is now just by user's patience
- Maxima questions about sign of variables or expressions in integrals are forwarded as error messages.
- Units are assumed to be positive in integrals and differential equations.
update3a.sm (21 KiB) downloaded 250 time(s).
- Expression size limit is now just by user's patience
- Maxima questions about sign of variables or expressions in integrals are forwarded as error messages.
- Units are assumed to be positive in integrals and differential equations.
update3a.sm (21 KiB) downloaded 250 time(s).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 users liked this post
#17 Posted: 12 years ago
Serious translation problem with unary minus in exponents.
Currently, we see no easy way to mitigate that. The attached sheet demonstrates some alternative approaches but they all would involve more than just some regular expressions.
The reason is in the incompatible operator priority between Maxima and SMath, none of both sides can be blamed for that, except that the very low priority of unary minus in SMath is really unusual and is cause of other problems (try displaying -10°C).

Currently, we see no easy way to mitigate that. The attached sheet demonstrates some alternative approaches but they all would involve more than just some regular expressions.
The reason is in the incompatible operator priority between Maxima and SMath, none of both sides can be blamed for that, except that the very low priority of unary minus in SMath is really unusual and is cause of other problems (try displaying -10°C).
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Radovan Omorjan 12 years ago
#18 Posted: 11 years ago
Plugin updated.
- Translation problem with unary minus in exponents solved (thanks to Leo Butler, one of the Maxima developers)
- Dedicated function ODE.2 for solving second order ODEs (wrapper for ode2())
- Bi-directional translation of greek uppercase letters
- Unidirectional (SMath to Maxima) translation of relational and boolean operators
- Improved error message forwarding

- Translation problem with unary minus in exponents solved (thanks to Leo Butler, one of the Maxima developers)
- Dedicated function ODE.2 for solving second order ODEs (wrapper for ode2())
- Bi-directional translation of greek uppercase letters
- Unidirectional (SMath to Maxima) translation of relational and boolean operators
- Improved error message forwarding
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
3 users liked this post
#19 Posted: 11 years ago
Plugin updated.
- Bidirectional transfer of string constants
-> more convenient plotting
-> Maxima string functions can be used
- Special markup for verbatim Maxima expressions ("$...$" )
- Special markup for quote character in MaximaLog() output
- Auxiliary files now reside in the plugin directory
- Bidirectional handling of different operator priorities in expressions like a^b^c or a^-b*c

- Bidirectional transfer of string constants
-> more convenient plotting
-> Maxima string functions can be used
- Special markup for verbatim Maxima expressions ("$...$" )
- Special markup for quote character in MaximaLog() output
- Auxiliary files now reside in the plugin directory
- Bidirectional handling of different operator priorities in expressions like a^b^c or a^-b*c
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
2 users liked this post
#20 Posted: 11 years ago
I don't know if it is only me but since last updates I can not use this plugin. At home my win7 x64 computer finds it and works as it is supposed. But at work I have a win7 x86 computer (non-english) and it can never find where maxima is. I have manually written "maxima.inf" file and it didn't helped. I have written thr MaximaControl ("init";"C:\\Program Files\") command and waited for 50 minutes and nothing happened.
-
New Posts
-
No New Posts