Smath issue with exp as matrix

Smath issue with exp as matrix - Messages

#1 Posted: 12/24/2024 11:32:05 PM
Cornel

Cornel

2 likes in 78 posts.

Group: User

Hi,

exp matrix.jpg
#2 Posted: 12/25/2024 12:36:45 AM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Is this OK ? I am not sure.

Example matrix of exp.png
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
#3 Posted: 12/25/2024 12:37:52 AM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

Matrix exponential is not implemented.

You can replicate in SMath what the Maxima engine does with the vecotrize() function (otherwise by default SMath tries to perform a scalar operation and fails).

2024-12-24 18_36_34-SMath Solver - [test.sm_].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 Posted: 12/25/2024 12:42:44 AM
Cornel

Cornel

2 likes in 78 posts.

Group: User

But still the SMath result is not the same as the Mathcad result...
#5 Posted: 12/25/2024 12:54:48 AM
Cornel

Cornel

2 likes in 78 posts.

Group: User

Wrote

But still the SMath result is not the same as the Mathcad result...



I think it's because as Davide said, Matrix exponential is not implemented in SMath. But then how to calculate the Matrix exponential in SMath? There is a way somehow?
#6 Posted: 12/25/2024 11:57:40 AM
Oscar Campo

Oscar Campo

124 likes in 298 posts.

Group: Moderator

Wrote

Hi,

exp matrix.jpg



This is the answer via wolfram alpha:
IMG_3096.jpg


Is the same obtained via vectorize function on SMath. Maybe your file or configuration on Mathcad have some parameters you are not mentioning?
2 users liked this post
Alvaro Diaz Falconi 12/25/2024 1:24:00 PM, Davide Carpi 12/25/2024 4:55:00 PM
#7 Posted: 12/25/2024 1:29:01 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi Cornel. The exponential function is a well-defined function from the complex plane into the complex plane. A possible extension to its domain and range being square matrices analogous to the ordinary exponential function can be defined as e^A = sum(A^k, k=1...infinity). And notice that this is valid only for square matrices, not for the general case.

In general, the other CASs have special functions for this extension of the exponential function: expm in matlab, MatrixExp in wolfram mathematica, exponential in maple and matrixexp in maxima, which you can access from SMath:

mat-exp.png

mat-exp.sm (13 KiB) downloaded 68 time(s).

So I guess if it is right for the developers of maxima, maple, mathematica and matlab to distinguish between both functions and to have specific instructions for each of them, then doing so in SMath is right, regardless of what the developers of mathcad think.

Best regards.
Alvaro.
2 users liked this post
Oscar Campo 12/25/2024 4:13:00 PM, francesco rapuano 12/25/2024 4:47:00 PM
#8 Posted: 12/25/2024 1:37:45 PM
Cornel

Cornel

2 likes in 78 posts.

Group: User

Wrote

Hi Cornel. The exponential function is a well-defined function from the complex plane into the complex plane. A possible extension to its domain and range being square matrices analogous to the ordinary exponential function can be defined as e^A = sum(A^k, k=1...infinity). And notice that this is valid only for square matrices, not for the general case.

In general, the other CASs have special functions for this extension of the exponential function: expm in matlab, MatrixExp in wolfram mathematica, exponential in maple and matrixexp in maxima, which you can access from SMath:

mat-exp.png

mat-exp.sm (13 KiB) downloaded 68 time(s).

So I guess if it is right for the developers of maxima, maple, mathematica and matlab to distinguish between both functions and to have specific instructions for each of them, then doing so in SMath is right, regardless of what the developers of mathcad think.

Best regards.
Alvaro.



Ok, understood. This was the thing I was looking for. Thank You.
#9 Posted: 12/26/2024 12:06:22 AM
overlord

overlord

554 likes in 1333 posts.

Group: Moderator

Wrote

In general, the other CASs have special functions for this extension of the exponential function: expm in matlab, MatrixExp in wolfram mathematica, exponential in maple and matrixexp in maxima, which you can access from SMath:


It seems there is also MatrixExponential in newer maple versions.
I tried to solve this problem using maple plugin by its library with(LinearAlgebra) command in maple, but couldn't prevail.
Old LinearAlgebra library lacks this particular command. Then you posted this solution.

Regards
#10 Posted: 12/26/2024 12:26:14 AM
Cornel

Cornel

2 likes in 78 posts.

Group: User

If it were possible to update from maple 6 to the latest version of maple...then would be great to stay up to date with the latest maple engine and with his latest available capabilities, but i understood that this is not possible..right?
#11 Posted: 12/26/2024 12:35:01 AM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

It's possible, but not as part of a plugin. I don't use maple often, so I'm too lazy to spend time on it.
Russia ☭ forever, Viacheslav N. Mezentsev
#12 Posted: 12/26/2024 12:44:16 AM
Cornel

Cornel

2 likes in 78 posts.

Group: User

Wrote

It's possible, but not as part of a plugin. I don't use maple often, so I'm too lazy to spend time on it.




But how to use then the latest maple engine If it's possible?

From my point of view If someone can make possible to use every time the latest version of maple engine in SMath then it would rise a lot SMath


And If You dont use often maple 6, then what you use? Maxima?
#13 Posted: 12/26/2024 12:50:35 AM
Cornel

Cornel

2 likes in 78 posts.

Group: User

@uni there is also wolfram engine for developers FREE to use...but how to integrate this in SMath?

See below:

https://writings.stephenwolfram.com/2019/05/launching-today-free-wolfram-engine-for-developers/

And this wolfram engine for developers it's updated as latest wolfram mathematica engine, even though the article is from 2019
#14 Posted: 12/26/2024 1:18:29 AM
Cornel

Cornel

2 likes in 78 posts.

Group: User

Maybe someone can announce, call or tell somehow to the SMath owner to integrate wolfram engine in SMath..
  • New Posts New Posts
  • No New Posts No New Posts