Symbolic evaluation

Symbolic evaluation - Unexpected behavior - Messages

#1 Posted: 1/12/2026 11:29:15 AM
Fabbro

Fabbro

0 likes in 20 posts.

Group: User

Good morning to all,

I'm checking some symbolic hand calculation and getting used (again, after a stop) with symbolic calculations in SMath.

And I've encountered some "strange" behaviors : it seems that, depending on how the same function (to be evalueted symbolically),
is written, the result is the one expected or not....

I'd not say, in a first instance, it is a bug: maybe I'm violating something implemented
in SMath...please, have a look to the attached file.

Any suggestion is more than welcome!

Thanks

Best Regards

TMMT formulas verification.sm (45.89 KiB) downloaded 85 time(s)." title="TMMT formulas verification.sm (45.89 KiB) downloaded 85 time(s).">TMMT formulas verification.sm (45.89 KiB) downloaded 85 time(s).
#2 Posted: 1/13/2026 2:22:32 AM
overlord

overlord

582 likes in 1,349 posts.

Group: Moderator

Choose a better alternative for symbolic calculations.
Maxima or Maple plugins usually (always) win over built-in engine.
Expand function generally does what you seek.

Regards

Click to enlarge
Edited 1/13/2026 2:23:31 AM
2 users liked this post
Alvaro 1/13/2026 6:02:24 PM, Fabbro 1/20/2026 11:51:30 AM
#3 Posted: 1/20/2026 12:55:30 PM
Fabbro

Fabbro

0 likes in 20 posts.

Group: User

Thanks OVERLORD!

"Maple plugin" works fine and really quickly!

Some more details:

--> I directly typed "expand"...so, I wonder if there is a list of commands (such as "expand") somewhere...
In case yes, here, specifically, I'd be interested to simplify / factor out (in Mathcad this function si called "simplify") the symbolic result

--> Enlarging the point of view.... As far as I can understand the Maple plugin use the Maple calculation engine
(what is free at least)...If so do you think it can be used elsewhere? I'd be particularely interested in functions of 1 variable
generated from matrices (4x4 and higher) multiplication in chaine...If Maple engine could speed up calculations it would be great..
Clearly I can create a new post with attached the specific spreadsheet....

About "Maxima plugin": I cannot find nor a plugin Maxima nor a function....some indications more?

Many thanks again & best regards
#4 Posted: 1/21/2026 4:02:24 PM
Martin Kraska

Martin Kraska

1,310 likes in 2,226 posts.

Group: Moderator

See https://nbn-resolving.org/urn:nbn:de:kobv:522-opus4-29497 for instructions and reference for the Maxima plugin.
Martin KraskaPre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Fabbro 1/21/2026 9:37:20 PM
#5 Posted: 1/22/2026 6:44:48 PM
Fabbro

Fabbro

0 likes in 20 posts.

Group: User

Dear MARTIN,

thank you very much for your reply!

Indeed, I downloaded both the plugin and Maxima.

And it works fine for the specific issue I highlighted.

I had a look also to your document on Maxima.

Going further (as for Overlord and Maple plugin) I'd like to know if (and how...) Maxima could
improve the time of calculation of a function derived from matrices multiplications.

The function is the characteristic equation of a transfer matrix for a non-uniform beam...better, the transfer
matrix of a beam made by multiple, uniform beams, different each other (multi-stepped beam)....

After a lot of numerical test I'm convinced that the best way to find roots of the characteristic
equation is:
--> plot the characteristic equation in the interval for interest
--> inspect for the minimum of the log10( absolute (characteristic))
--> find the mimimum

But for that, you have to built/calculate a huge amount of points of the characteristic equation.

The final goal is the calculation of lowest roots of the characteristic equation for a multistepped beam made
by 50 single beams, in a reasonable time (let's say a couple of hours).

In the attached file you have an example....the characteristic equations are highlighted in
pale blue.


3RodsStepped_vs_measures V10 _for Prof Kraska.sm (281.96 KiB) downloaded 8 time(s).Whatever the suggestion you've , is more than welcome!

Many thanks and best regards


#6 Posted: 1/23/2026 9:46:18 AM
Martin Kraska

Martin Kraska

1,310 likes in 2,226 posts.

Group: Moderator

An include file is missing, so I can't run your worksheet. Also make sure that all your math regions are set to numerical optimization.
Martin KraskaPre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Fabbro 1/23/2026 10:34:38 AM
#7 Posted: 1/23/2026 2:08:10 PM
Fabbro

Fabbro

0 likes in 20 posts.

Group: User

Dear MARTIN,

really sorry, I apologise for that.

Here attached a new version of the file and the file called by include.

Following your advice, I checked in all the reqions the optimisation options: they were on "numeric" or "symbolic"
without apparent logic....


I assumed that the default optimisation option was "numeric". To be set on "symboilic" or "none" by manual choice:
I'll pay more attention to this detail!

By the way, I left the optimisation option on "symbolic" ONLY for the expression highlighetd in cyan.

Set this way the sheet takes 1402 secs to run.

As said, any suggestion is more than welcome!

Best Regards

Fabio

TMMT algo_under_crit.sm (98.11 KiB) downloaded 6 time(s).

3RodsStepped_vs_measures V10 _for Prof Kraska V1.sm (282.78 KiB) downloaded 6 time(s).
  • New Posts
  • No New Posts