Smath issue with exp as matrix

Smath issue with exp as matrix - 消息

#1 已发布: 2024/12/24 23:32:05
Cornel

Cornel

2个赞,共78个帖子。

组: User

Hi,

exp matrix.jpg
#2 已发布: 2024/12/25 00:36:45
NDTM Amarasekera

NDTM Amarasekera

130个赞,共352个帖子。

组: 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 已发布: 2024/12/25 00:37:52
Davide Carpi

Davide Carpi

1,443个赞,共2,936个帖子。

组: 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 已发布: 2024/12/25 00:42:44
Cornel

Cornel

2个赞,共78个帖子。

组: User

But still the SMath result is not the same as the Mathcad result...
#5 已发布: 2024/12/25 00:54:48
Cornel

Cornel

2个赞,共78个帖子。

组: 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 已发布: 2024/12/25 11:57:40
Oscar Campo

Oscar Campo

135个赞,共309个帖子。

组: 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位用户喜欢此帖子
Alvaro 2024/12/25 13:24:00, Davide Carpi 2024/12/25 16:55:00
#7 已发布: 2024/12/25 13:29:01
Alvaro

Alvaro

1,139个赞,共1,805个帖子。

组: 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.45 KiB)已下载 1702 次。

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位用户喜欢此帖子
Oscar Campo 2024/12/25 16:13:00, francesco rapuano 2024/12/25 16:47:00
#8 已发布: 2024/12/25 13:37:45
Cornel

Cornel

2个赞,共78个帖子。

组: 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.45 KiB)已下载 1702 次。

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 已发布: 2024/12/26 00:06:22
overlord

overlord

600个赞,共1,381个帖子。

组: 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 已发布: 2024/12/26 00:26:14
Cornel

Cornel

2个赞,共78个帖子。

组: 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 已发布: 2024/12/26 00:35:01
Вячеслав Мезенцев

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

1,558个赞,共1,868个帖子。

组: 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 已发布: 2024/12/26 00:44:16
Cornel

Cornel

2个赞,共78个帖子。

组: 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 已发布: 2024/12/26 00:50:35
Cornel

Cornel

2个赞,共78个帖子。

组: 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 已发布: 2024/12/26 01:18:29
Cornel

Cornel

2个赞,共78个帖子。

组: User

Maybe someone can announce, call or tell somehow to the SMath owner to integrate wolfram engine in SMath..
  • 有新帖
  • 无新帖