CAS Functions

hawe shared this question 1 week ago
Answered

I am currently comparing the functionalities of wxmaxima and geogebra cas:

Programming a newton iteration with the jacobimatrix: What I have in maxima

/y17+ogJAAAASAIxAQAAAEkgJgAAACAJxAQAAAAkgZgAAACAJA5LLy0CAAAA8IFaAAAAgCQQEwAAAJAEYgIAAACSQEwAAABAEogJAAAASOLfAPKsDpzhmfxcAAAAAElFTkSuQmCC

I get very non-uniform results when using lists or matrices in user defined function:

So I defined F as vector

F(x,y):=(x^3+y^3-4,x^3-y^3)


and the Jacobimatrix as

Jo(x,y):={{ Derivative( F (1,0),x), Derivative( F (1,0),y)},{ Derivative( F (0,1),x), Derivative( F (0,1),y)}}


Jo(x,y) = result is the Matrix

Jo(1,1) = ?


New try - setting the result in Matrix

J(x,y):=Take({{(3 * x^(2)), (3 * y^(2))}, {(3 * x^(2)), ((-3) * y^(2))}},1,2)


I have to add Take to get a result matrix to make an iteration step

{1,1}-(J(1,1)^-1) F(1,1)


that is not satisfactory because the application does not calculate top down - even if there is the command "Substitute"...

Why user defined function have problems to result list or matrix?

Comments (2)

photo
1

Salut hawe!


Hmm, bist Du Dir sicher, dass der Befehl "Derivative( F (1,0),x)" wirklich passend ist?

Wäre nicht "Derivative( F,x)(1,0)" oder "Derivative( F(x,y),x)(1,0)" sinnvoller?

Probier das doch mal aus.


Gruß

mire2

photo
1

Ok, anderer Ansatz, weil ich das wohl missverstanden habe.

Jo(x,y) ist zwar Deine Jacobi-Matrix, aber bei der kannst Du jetzt nicht so einfach, wie bei einer mehrwertigen Funktion, Jo(1,1) bilden.


Versuche stattdessen mal:


Ersetze(Jo(x,y),{x,y},{1,1})


Gruß

mire2

© 2019 International GeoGebra Institute