Maxima will not follow script

Maxima will not follow script - Messages

#1 Posted: 4/14/2020 2:48:19 PM
haweHofmann

haweHofmann

3 likes in 32 posts.

Group: User

Not even the examples of the script will work.

Testfunction

Maxima native
/* [wxMaxima: input start ] */
KN(K0,q,n,R):=K0*q^n+R*q*(q^n-1)/(q-1);
/* [wxMaxima: input end ] */
//* [wxMaxima: input start ] */
solve(KN(K0,1+0.025/12,120,600)=150000,K0), numer;
/* [wxMaxima: input end ] */
[K0=53070.8653044463]

It is possible to
MaximaDefine(KN(K0,q,n,R):=K0*q^n+R*q*(q^n-1)/(q-1)) ?
got a curious respose - maxima def in log was KN():--- should be KN():=---
give the function to
but no success..

some attempts e.g. 6.11.1

Greenshot Editor_2020-04-14_19-28-26.jpg

any idea set maxima to work
Portable 6884



#2 Posted: 4/14/2020 4:49:23 PM
haweHofmann

haweHofmann

3 likes in 32 posts.

Group: User

Wrote


You forgot to attach the work sheet !



Excuse me MaximaVersuche.sm (13 KiB) downloaded 31 time(s).
need to push the upload button, too ;-)

remember I have placed

KN(K0,q,n,R):=K0*q^n+R*q*(q^n-1)/(q-1);

because
MaximaDefine(KN:=...)
has not worked - should it do?
#3 Posted: 4/15/2020 5:54:25 PM
haweHofmann

haweHofmann

3 likes in 32 posts.

Group: User

Unfortunately my first maxima example delivered about 350 digit fraction that was beyond the number limits of SMath - confusing me.

Wrote

Why complicate matters ?


What meaning does eval have?

This was not my question, but I think I found some answers.

Get only a reasonable answer from Maxima if I use symbolic evaluation.
But this indicates the next one...
How to process the anwser of Maxima (copy&paste is not realy helpful)
SMath Studio 0.99.6884 - [KreditRechner.VideoMitschnitt.sm]_2020-04-15_22-22-50.jpg




I made a video session to this page to show what my intensions are:



#4 Posted: 4/16/2020 6:27:36 AM
haweHofmann

haweHofmann

3 likes in 32 posts.

Group: User

Wrote



I don't use Maxima plug-in except as delivered with native SS.



I found the explanation in Kraska-script 6.11.1

(Assign(Max(K.Mx))-1)*12=0.0289

Assign turns the equation into an assignment
#5 Posted: 4/17/2020 2:19:04 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote



I found the explanation in Kraska-script 6.11.1

(Assign(Max(K.Mx))-1)*12=0.0289

Assign turns the equation into an assignment



Yes. This hint is also found in the dynamic help. Assign also works for function results from ODE2()

2020-04-17 19_13_36-SMath Studio 0.99.7251 - [Kurbel.sm_].png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
frapuano 4/17/2020 3:04:00 PM
#6 Posted: 4/17/2020 4:38:12 PM
haweHofmann

haweHofmann

3 likes in 32 posts.

Group: User

Wrote


Yes. This hint is also found in the dynamic help. Assign also works for function results from ODE2()



Ja - gelesen schon - aber nicht verstanden :-)

Und weil mein erster Versuch gleich am Zahlenlimit scheiterte und das log doch ein Ergebnis angezeigt hab ich an ganz anderer Stelle gesucht - mir war auch nicht klar, dass nur die symbolische Auswertung sinnvoll ist. Vielleicht ein fetter Hinweis im Skript? ;-)

Aber wenn Sie schon mal da sind.

Wie ist das mit MaximaDefine?
Im ersten Post ist die Problemstelle noch sichtbar - da häng ich immer noch.
Ich werd nicht ganz schlau daraus - es ist wohl keine Funktionsdef (mit :=) möglich , nur Zuweisungen ( mit : ) in Maxima?
Im Video zum Schluß lass ich Maxima meine Anuitätenformel auf die verschiedenen Variablen umstellen und auf dem Arbeitsblatt (siehe Bild) hab ich MaximaDefine so eingesetzt wie ichs verstanden hab.
Könnten Sie mal einen Blick drauf werfen? Und ggf. was dazu sagen...
Vielen Dank für die Hinweise!

SMath Studio 0.99.6884 - [KreditRechner.VideoMitschnitt.sm]_2020-04-17_21-29-02.jpg
#7 Posted: 4/17/2020 6:48:17 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... from native Smath SS 6179.

SOLVEwisely.PNG
#8 Posted: 4/18/2020 2:14:54 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

Wrote


Yes. This hint is also found in the dynamic help. Assign also works for function results from ODE2()



Ja - gelesen schon - aber nicht verstanden :-)

Und weil mein erster Versuch gleich am Zahlenlimit scheiterte und das log doch ein Ergebnis angezeigt hab ich an ganz anderer Stelle gesucht - mir war auch nicht klar, dass nur die symbolische Auswertung sinnvoll ist. Vielleicht ein fetter Hinweis im Skript? ;-)

Aber wenn Sie schon mal da sind.

Wie ist das mit MaximaDefine?
Im ersten Post ist die Problemstelle noch sichtbar - da häng ich immer noch.
Ich werd nicht ganz schlau daraus - es ist wohl keine Funktionsdef (mit :=) möglich , nur Zuweisungen ( mit : ) in Maxima?
Im Video zum Schluß lass ich Maxima meine Anuitätenformel auf die verschiedenen Variablen umstellen und auf dem Arbeitsblatt (siehe Bild) hab ich MaximaDefine so eingesetzt wie ichs verstanden hab.
Könnten Sie mal einen Blick drauf werfen? Und ggf. was dazu sagen...
Vielen Dank für die Hinweise!



I'll respond in english, otherwise we create noise without signal in this forum for many users. In case of problems please use your preferred online translator.

As to mandatory usage of symbolic (or even better: none) optimization for symbolic Maxima results: I did as you said, added a hint. A new handbook version is ready since some months, just waiting for a new stable SMath Studio version to make final adjustments.

As to MaximaDefine: To be honest, I have no clue what you try to do with MaximaDefine. For details see the interactive handbook (in the extension manager), goto Function index> MaximaDefine(). BTW, I just saw that information on Maxima define is missing in the Handbuch, I'll add this.

Do you think that realroots from Maxima is more powerful than solve() or roots() in native SMath? If there is evidence for this, we could provide direct access (much like Solve() is just a wrapper for maxima's solve().

You should be able to get LL directly with Solve(eqn,R). eqn being your equation which you assigned to Kn.

File not found.File not found.

Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#9 Posted: 4/28/2020 5:18:13 PM
haweHofmann

haweHofmann

3 likes in 32 posts.

Group: User

Wrote




Meanwhile I prepare a project to cubic splines in a very simple basic matter.
I have generated the coefficients of the polynoms

for(j,range(1,(rows(X)-1)),for(i,range(0,3),el(vars,(j-1)*4+i+1):str2num(concat("a",num2str(j),num2str(i)))))

==>mat(a10,a11,a12,a13,a20,a21,a22,a23,a30,a31,a32,a33,a40,a41,a42,a43,1,16)

I build the lin Equ system and solve it in Maxima, it seems to me Assign doesn't do assignment.


VAR should have the values of aij after Assign?



BTW:
I tried to simplify (ratsimp, expand) the cubic polynoms - Maximalog shows simplified functions, but Optimization nullifies it. After setting to none I get the true term from Maxima back - it took me a while to figure it out.
#10 Posted: 4/28/2020 6:11:59 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

Wrote




Meanwhile I prepare a project to cubic splines in a very simple basic matter.
I have generated the coefficients of the polynoms

for(j,range(1,(rows(X)-1)),for(i,range(0,3),el(vars,(j-1)*4+i+1):str2num(concat("a",num2str(j),num2str(i)))))

==>mat(a10,a11,a12,a13,a20,a21,a22,a23,a30,a31,a32,a33,a40,a41,a42,a43,1,16)

I build the lin Equ system and solve it in Maxima, it seems to me Assign doesn't do assignment.
...

VAR should have the values of aij after Assign?

BTW:
I tried to simplify (ratsimp, expand) the cubic polynoms - Maximalog shows simplified functions, but Optimization nullifies it. After setting to none I get the true term from Maxima back - it took me a while to figure it out.



1. No need to wrap Maxima() around Solve(). Solve() is known to SMath Studio via the plugin, just as Assign.
2. You need to actually execute the Assign() call by requesting a result. Otherwise nothing will happen. You could also write Assign(Solve( ))= and you get solutions and assignments in a single cell.
3. It is always a good idea to switch off optimization for symbolic Maxima results.
4. Processing equation-shaped results using at() is absolutely ok.

2020-04-28 22_59_42-SMath Studio 0.99.7251 - [SplinesABC.sm_].png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#11 Posted: 4/28/2020 9:04:38 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Meanwhile I prepare a project to cubic splines in a very simple basic matter.


Cubic spline per say Smath cinterp(X,Y,x) is universal...
1/1 Mathematica, Matlab, Mathcad, Smath ...
Added to "cinterp(X,Y,x) => lsplne, pspline, fintegrate, dspline.
All, ready to use as exemplified in the attached, native Smath.

Cheers ... Jean

Maths EDU Reconciliation [l_p_c_splines SEGMENTS].sm (59 KiB) downloaded 38 time(s).
Maths EDU Reconciliation [l_p_c_splines].sm (75 KiB) downloaded 39 time(s).
1 users liked this post
frapuano 4/29/2020 3:21:00 PM
#12 Posted: 4/29/2020 7:41:37 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... refreshed Edu style.

Maths EDU Reconciliation [l_p_c_splines SEGMENTS].sm (64 KiB) downloaded 42 time(s).
1 users liked this post
frapuano 4/30/2020 3:04:00 PM
  • New Posts New Posts
  • No New Posts No New Posts