Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

14 Pages«<121314
Options
Go to last post Go to first unread
Offline Razonar  
#261 Posted : 13 March 2019 07:34:13(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 357
Uruguay

Was thanked: 161 time(s) in 101 post(s)
Hi. Can the Maxima plugin beheavior could be changed to agree with SMath (and Mathcad) diff operator, when the variable is defined?:

MaximaDiff.sm (7kb) downloaded 6 time(s).

MaximaDiff.gif

Thanks in advance for your answer.
Alvaro.
Offline mkraska  
#262 Posted : 13 March 2019 12:04:29(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,486
Germany

Was thanked: 789 time(s) in 504 post(s)
Originally Posted by: Razonar Go to Quoted Post
Hi. Can the Maxima plugin beheavior could be changed to agree with SMath (and Mathcad) diff operator, when the variable is defined?:

Thanks in advance for your answer.
Alvaro.


This would require access to the unevaluated (non-preprocessed) verbatim expression from within the plugin. I don't know if that is currently possible. Same problem applies for definite integrals for numeric evaluation. I could take over numeric quadrature as well if I had access to the unevaluated expression.

Perhaps our other developers have a quick anwer?
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
Offline Razonar  
#263 Posted : 13 March 2019 13:01:44(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 357
Uruguay

Was thanked: 161 time(s) in 101 post(s)
Originally Posted by: mkraska Go to Quoted Post

This would require access to the unevaluated (non-preprocessed) verbatim expression from within the plugin. I don't know if that is currently possible. Same problem applies for definite integrals for numeric evaluation. I could take over numeric quadrature as well if I had access to the unevaluated expression.

Perhaps our other developers have a quick anwer?


Hi Martin. Clean() seems to have this kind of access.

Best regards.
Alvaro.

Offline mkraska  
#264 Posted : 13 March 2019 15:54:01(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,486
Germany

Was thanked: 789 time(s) in 504 post(s)
Originally Posted by: Razonar Go to Quoted Post

Hi Martin. Clean() seems to have this kind of access.
Best regards.
Alvaro.


Clear() is defined in the Special functions plugin, which is closed source and probably isn't restricted to the third party plugin API.
The Maxima plugin has already survived several API changes, sometimes Andrey made adjustments even to third party plugins immediately, sometimes major re-work is required and update delays result from that. Unfortunately, I probably will only get up and running again with Visual Studio in summer. There is quite a todo list for the maxima plugin.

Maxima has it's own mechanism for suppressing evaluation/simplification, the so called "noun" property (inactive expression). I filed support for this in the plugin as request SS-3478

Edited by user 13 March 2019 15:55:34(UTC)  | Reason: Not specified

Martin Kraska

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
Offline Razonar  
#265 Posted : 13 March 2019 17:08:19(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 357
Uruguay

Was thanked: 161 time(s) in 101 post(s)
Hi Martin. I see the request SS-3478. But I guess that this isn't related with the noun Maxima's property (x::uneval in maple, and Hold[] in Mathematica. Actually I ask some time ago something like this related with derivatives of cool prop package).

I guess that defining

Code:
bool IPluginLowLevelEvaluation.ExpressionEvaluation(Term root, Term[][] args, ref Store context, ref Term[] result)


where the difference with normal call is ref Store context, and then

Code:
termVar = SMath.Math.Computation.Preprocessing(termVar, ref context); 


you can handle the case where an argument is defined, catching the variable name, and trying to determine if it is defined or not.

Actually I paste both of them from Maxima plugin source code. (But the second is commented).

Best regards.
thanks 1 user thanked Razonar for this useful post.
on 13/03/2019(UTC)
Offline Jean Giraud  
#266 Posted : 14 March 2019 05:47:19(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 3,603
Canada

Was thanked: 676 time(s) in 528 post(s)
Originally Posted by: Razonar Go to Quoted Post
Actually I ask some time ago something like this related with derivatives of cool prop package).

That's interesting, Alvaro.
My understanding is that the underlying equations are IAPWS, to be tracable.
As implemented in Smath just a cluster fuck. OK, I don't need, using WASP
from Katmar. Under the hood, those functions are monkey business. I say that
because I coded those animals from personal transmission from Bernhard S.
I coded in VB. ALL OK, coded nearly all in Mathcad OK.
About your point of getting the derivative in Smath: not possible.
Not possible unless CoolProp re-coded from A ...Z.
In Smath CoolProp, you just get the interpolated value.
Most probably, those properties are respective data sets, interpolated.
IAPWS are a soup of polynomials. Correctly implemented, you will have
them on plot and derivatives.
I believe this package is the one from Valery at the time of his
web Mathcad calculator.
If interested, can check if still on my MCD 11.
I have most of IAPWS in Smath otherwise approximated, hyper accurate !

Cheers Alvaro ... Jean

PS: WASP from Katmar is not freeware but you have unlimited sessions
of 3 minutes [originally it was 10 minutes].




Offline Razonar  
#267 Posted : 15 March 2019 08:32:48(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 357
Uruguay

Was thanked: 161 time(s) in 101 post(s)
Hi. There are some issue here:

Clipboard01.gif

maxima_laplace.sm (6kb) downloaded 8 time(s).

Best regards.
Alvaro.
thanks 1 user thanked Razonar for this useful post.
on 15/03/2019(UTC)
Offline mkraska  
#268 Posted : 15 March 2019 12:40:13(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,486
Germany

Was thanked: 789 time(s) in 504 post(s)
Originally Posted by: Razonar Go to Quoted Post
Hi. There are some issue here:


The problem seems to be the pre-mature execution of at() on SMath side. You see that if you switch off the Custom Functions plugin, then the answer is correctly displayed. Thus it isn't a translation issue. It would be desirable to keep the unevaluated response at least if optimization is set to "none".

I need to see if the Maxima plugin can do anything about it or even is the culprit.

Thank you for pointing this out. Filed as SS-4597.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
thanks 1 user thanked mkraska for this useful post.
on 15/03/2019(UTC)
Offline Razonar  
#269 Posted : 15 March 2019 13:20:07(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 357
Uruguay

Was thanked: 161 time(s) in 101 post(s)
Hi Martin. Thanks. Here, exp instead e^ seems to avoid this issue.

Implementation of the Laplace method solving a system of odes with Maxima laplace and ilt transforms, and it's comparative with numerical solution.

Laplace_Maxima.sm (56kb) downloaded 7 time(s).

Laplace_Maxima.pdf (129kb) downloaded 11 time(s).

Best regards.
Alvaro.

Edited by user 15 March 2019 14:02:26(UTC)  | Reason: Mistake in sm version.

thanks 1 user thanked Razonar for this useful post.
on 15/03/2019(UTC)
Offline Razonar  
#270 Posted : 15 March 2019 15:45:21(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 357
Uruguay

Was thanked: 161 time(s) in 101 post(s)
Same as before, but with a system without a close form for the inverse laplace.

Laplace_Maxima2.sm (57kb) downloaded 8 time(s).

Laplace_Maxima2.pdf (161kb) downloaded 8 time(s).

Best regards.
Alvaro.


Offline Jean Giraud  
#271 Posted : 15 March 2019 15:49:57(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 3,603
Canada

Was thanked: 676 time(s) in 528 post(s)
Originally Posted by: Razonar Go to Quoted Post
Here, exp(x) instead e^ seems to avoid this issue.

As I mentioned this to Reg few days ago, then spot checked in Smath.
No difference was observed on the 15 D results. In Mathcad, yes e^
is less accurate than exp(x) that runs the Win built-in 21 D of which
the kernel retains 17 D and displays 15 by convention.
In other words, Maxima does not recognize e^ as the scalar exp(x).




Offline mkraska  
#272 Posted : 15 March 2019 17:16:25(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,486
Germany

Was thanked: 789 time(s) in 504 post(s)
Originally Posted by: Razonar Go to Quoted Post
Hi Martin. Thanks. Here, exp instead e^ seems to avoid this issue.


Confirmed. Thank you, filed as SS-4598
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://en.smath.info/wi...th%20with%20Plugins.ashx
Offline Jean Giraud  
#273 Posted : 15 March 2019 17:19:34(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 3,603
Canada

Was thanked: 676 time(s) in 528 post(s)
Originally Posted by: Razonar Go to Quoted Post
Same as before, but with a system without a close form for the inverse laplace.

Remember Alvaro, we had some exchange on that Mathsoft Collaboratory.

ODE_Laplace Read First.sm (28kb) downloaded 11 time(s).
ODE_Laplace 1rst [Type 1].sm (25kb) downloaded 10 time(s).
ODE_Laplace 1rst [Type 2].sm (23kb) downloaded 9 time(s).
ODE_Laplace 2nd [Type 3].sm (34kb) downloaded 9 time(s).

Created SS 5346 ... OK SS 6179

Jean
Offline Razonar  
#274 Posted : 15 March 2019 21:46:12(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 357
Uruguay

Was thanked: 161 time(s) in 101 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post

Remember Alvaro, we had some exchange on that Mathsoft Collaboratory.



Hi Jean.
I remember that.

Best regards
Alvaro
Offline Jean Giraud  
#275 Posted : 17 March 2019 00:22:37(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 3,603
Canada

Was thanked: 676 time(s) in 528 post(s)
Originally Posted by: Razonar Go to Quoted Post
Hi Jean.
I remember that.


Try that one with the forcing q(t):= t^0.5 and q(t):= ln(t)
ln(t) expands in term of Ei(,) exponential integral.
How is Maxima will react ?

Jean

ODE_Laplace 2nd [Type 3 Dirac Integral].sm (28kb) downloaded 6 time(s).
Offline Razonar  
#276 Posted : 17 March 2019 02:35:25(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 357
Uruguay

Was thanked: 161 time(s) in 101 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post

How is Maxima will react ?


Hi Jean. Maxima can't find a close symbolic solution, only find the laplace transform. But this example shows how powerful is the Oscar' routine for inverting numerically laplace transforms. RKFixed and RKAdapt fails and, as you point, only the uni specialized solver dn_GearsBDF seems to solve the equation.

Laplace_Maxima6.pdf (95kb) downloaded 11 time(s).

Laplace_Maxima6.sm (65kb) downloaded 7 time(s).

Best regards.
Alvaro

Edited by user 17 March 2019 02:37:38(UTC)  | Reason: Not specified

Offline Razonar  
#277 Posted : 17 March 2019 05:49:28(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 357
Uruguay

Was thanked: 161 time(s) in 101 post(s)
Hi. This is my attemp to solve a linear equation with polynomial coefficients by laplace method with Maxima. Even don't works, give a solution very close to the numerical RK solver, but I can't see what I'm doing wrong. Any help is welcomed.

Laplace_Maxima5.sm (100kb) downloaded 13 time(s).

Best regards.
Alvaro


Offline Jean Giraud  
#278 Posted : 18 March 2019 21:41:27(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 3,603
Canada

Was thanked: 676 time(s) in 528 post(s)
Originally Posted by: Razonar Go to Quoted Post
This is my attemp to solve a linear equation with polynomial coefficients by laplace method with Maxima. Even don't works, give a solution very close to the numerical RK solver, but I can't see what I'm doing wrong. Any help is welcomed.

Can't help Alvaro.
I don't have Maxima. Just posted last minute Oscar InvLaplace.
Don't forget Frobenius for some of those kind variable coefficients.
Works fine Smath, with coefficients helper solve.

Buenos dias Amigo !

Users browsing this topic
Similar Topics
[Maxima Plugin] is a custom Maxima function call-able in SMath (Questions)
by 007.000 22/05/2018 13:06:49(UTC)
[Maxima Plugin] least common multiple (Questions)
by 007.000 22/05/2018 12:13:20(UTC)
news for Maxima Plugin (Questions)
by oscampo 27/01/2016 18:39:35(UTC)
Maxima plugin error (Bugs & Problems)
by olik 30/11/2015 10:17:28(UTC)
14 Pages«<121314
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.