Dealing with long line formulas

Dealing with long line formulas - Searching for a matrix equivalent represetation tool - Messaggi

#1 Pubblicato: 04/04/2026 10:11:11
ioan92

ioan92

181 apprezzamenti in 125 post.

Gruppo: User

Hello Everybody,

Sometimes, I deal with formulas laying out in a very long line, as shown in the appended file examples.
Long Lines Formulas - Width Reduction.sm (72,77 KiB) scaricato 596 volta(e).
To improve the use of such structures, I consider using a matrix presentation.
The sum of the matrix terms is equivalent to the input formula; see the checks in my examples.
Seeing the complex imbrication of the input formula’s terms, the “by hand organization” treatment is often fastidious and hard to prevent errors.
I imagine that many people had to face this problem of handling results from symbolic integration, for instance.
I noticed useful tools like “simplify,” “expand,” and “convert,” available with MAPLE. They are available also with Maxima.
I wonder if there is a way or a tool to deal with the problem in a more specific way?
Thanks for your attention and for your solutions.

Regards,
Ioan


Modificato 05/04/2026 19:30:38
Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov
#2 Pubblicato: 05/04/2026 10:34:21
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

Here is a version with the Mathcad block.

Unfortunatly not without something strange happening in the background.

grafik.png
grafik.png


Long Lines Formulas - Width Reduction_Kr.sm (128,68 KiB) scaricato 595 volta(e).
Modificato 05/04/2026 10:38:50
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1 utenti hanno apprezzato questo post
ioan92 05/04/2026 15:22:49
#3 Pubblicato: 05/04/2026 17:33:47
ioan92

ioan92

181 apprezzamenti in 125 post.

Gruppo: User

Thanks for the attempt.

I tried to use some features available for manipulating formulas as wel in MAPLE as in MAXIMA, namely: expand() and simplify().
My idea is applied in the appended file. Long Lines Formulas - Width Reduction bis .sm (33,2 KiB) scaricato 624 volta(e).
This helped me to organize better (?) by hand the input sausage formula but it is not my hope.
My optimistic expectation would be a tool that handle this organization in enough simple way.

Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov
#4 Pubblicato: 05/04/2026 21:01:04
overlord

overlord

600 apprezzamenti in 1.381 post.

Gruppo: Moderator

I did proposed a better solution several years ago.

https://smath.com/en-US/forum/topic/vTrsUs/Equation-Wrapping#msg128281
1 utenti hanno apprezzato questo post
ioan92 06/04/2026 07:27:33
#5 Pubblicato: 06/04/2026 07:39:29
ioan92

ioan92

181 apprezzamenti in 125 post.

Gruppo: User

Wrote

I did proposed a better solution several years ago.

https://smath.com/en-US/forum/topic/vTrsUs/Equation-Wrapping#msg128281



It is a nice solution but this belongs to "by hand making" field; I hoped something more...

Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov
#6 Pubblicato: 06/04/2026 07:58:39
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

How about this one... use optimization/none

grafik.png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1 utenti hanno apprezzato questo post
ioan92 06/04/2026 11:27:54
#7 Pubblicato: 06/04/2026 12:56:35
ioan92

ioan92

181 apprezzamenti in 125 post.

Gruppo: User

Thanks a lot !!!
That's it what I need to build a "constructor" for the final result vector - split the line in simple terms.
I still need a tool to count the number of charaters of a line of the final vector. Maibe is there something in the Davide's tresaury ?

Ioan 06042026.png
Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov
#8 Pubblicato: 06/04/2026 16:59:17
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: Moderator

This is just native Maxima.

grafik.png
Modificato 06/04/2026 17:00:14
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1 utenti hanno apprezzato questo post
ioan92 07/04/2026 08:57:51
#9 Pubblicato: 06/04/2026 18:11:02
Alvaro

Alvaro

1.139 apprezzamenti in 1.805 post.

Gruppo: User

Hi. This could be another approach. For a long formula, where even separating terms can be tricky, simply take its string and add some carriage returns anywhere in the description (with shift+Enter) so it doesn't overflow the page. This works to show the formula being used, assuming whoever reviews it is a very meticulous and patient person.

image.png

Long Lines Formulas - Width Reduction.sm (76,19 KiB) scaricato 601 volta(e).

Best regards.
Alvaro.
1 utenti hanno apprezzato questo post
ioan92 07/04/2026 13:34:05
#10 Pubblicato: 06/04/2026 19:53:13
ioan92

ioan92

181 apprezzamenti in 125 post.

Gruppo: User

I applied Martin's solution, based on Maxima, on a very long equation.
I obtained a matrix of matrices, equivalent to the initial one very long line equation .
As an example, I put the case in the appended file.
Split and Recoposition of a Line Equation.sm (320,98 KiB) scaricato 658 volta(e).
The procedure could be general. I have not yet a definitive presentation of all necessary transformations
If somebody is interested in the subject, please send a sign,
Ioan
Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov
#11 Pubblicato: 06/04/2026 20:34:56
ioan92

ioan92

181 apprezzamenti in 125 post.

Gruppo: User

Wrote

Hi. This could be another approach. For a long formula, where even separating terms can be tricky, simply take its string and add some carriage returns anywhere in the description (with shift+Enter) so it doesn't overflow the page. This works to show the formula being used, assuming whoever reviews it is a very meticulous and patient person.

Best regards.
Alvaro.


Hi Alvaro,

I’m, once again, impressed with the condensed formalism you deployed.
Your solution is very compact, but I hadn’t announced yet my “hidden” objective.
In fact, as long as I rest in the SMath environment, the equation length does not disturb me excessively. Also, as long as I’m into the SMath environment, the symbolic solution of integration is nice, compact and “efficient” (?). But, when I step out into a different programming environment, I feel it necessary to have an explicit solution! (???).
That’s why I enjoy Martin’s way – as fitting more my expectations.
All my thanks for your brilliant solution. I save it in my treasury.

Best regards,
Ioan

Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov
#12 Pubblicato: 10/04/2026 17:20:44
ioan92

ioan92

181 apprezzamenti in 125 post.

Gruppo: User

[i]Hello Everybody,

Some time ago, I opened this Topic in the SMath Forum.
I received some very useful help and suggestions.
I thank all the contributors a lot.
As a recognition to helpers and as well for any good use, I post here my final results:
### FIN EQ 08042026 FIN.sm (597,06 KiB) scaricato 694 volta(e).
I keep all my attention, and I thank in advance for any critics and improvement suggestions.

Best Regards,
Ioan


Modificato 10/04/2026 17:21:34
Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov
2 utenti hanno apprezzato questo post
sergio 10/04/2026 19:16:34, Alvaro 11/04/2026 16:45:58
  • Nuovi post
  • Nessun nuovo post