Dealing with long line formulas

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

#1 Publicado: 4/4/2026 10:11:11
ioan92

ioan92

181 me gusta en 125 mensajes.

Grupo: 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) descargado 589 vez(es).
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


Editado 5/4/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 Publicado: 5/4/2026 10:34:21
Martin Kraska

Martin Kraska

1.361 me gusta en 2.275 mensajes.

Grupo: 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) descargado 589 vez(es).
Editado 5/4/2026 10:38:50
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
A 1 usuarios les gustó este mensaje
ioan92 5/4/2026 15:22:49
#3 Publicado: 5/4/2026 17:33:47
ioan92

ioan92

181 me gusta en 125 mensajes.

Grupo: 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) descargado 617 vez(es).
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 Publicado: 5/4/2026 21:01:04
overlord

overlord

600 me gusta en 1.381 mensajes.

Grupo: Moderator

I did proposed a better solution several years ago.

https://smath.com/en-US/forum/topic/vTrsUs/Equation-Wrapping#msg128281
A 1 usuarios les gustó este mensaje
ioan92 6/4/2026 7:27:33
#5 Publicado: 6/4/2026 7:39:29
ioan92

ioan92

181 me gusta en 125 mensajes.

Grupo: 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 Publicado: 6/4/2026 7:58:39
Martin Kraska

Martin Kraska

1.361 me gusta en 2.275 mensajes.

Grupo: 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
A 1 usuarios les gustó este mensaje
ioan92 6/4/2026 11:27:54
#7 Publicado: 6/4/2026 12:56:35
ioan92

ioan92

181 me gusta en 125 mensajes.

Grupo: 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 Publicado: 6/4/2026 16:59:17
Martin Kraska

Martin Kraska

1.361 me gusta en 2.275 mensajes.

Grupo: Moderator

This is just native Maxima.

grafik.png
Editado 6/4/2026 17:00:14
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
A 1 usuarios les gustó este mensaje
ioan92 7/4/2026 8:57:51
#9 Publicado: 6/4/2026 18:11:02
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: 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) descargado 595 vez(es).

Best regards.
Alvaro.
A 1 usuarios les gustó este mensaje
ioan92 7/4/2026 13:34:05
#10 Publicado: 6/4/2026 19:53:13
ioan92

ioan92

181 me gusta en 125 mensajes.

Grupo: 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) descargado 652 vez(es).
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 Publicado: 6/4/2026 20:34:56
ioan92

ioan92

181 me gusta en 125 mensajes.

Grupo: 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 Publicado: 10/4/2026 17:20:44
ioan92

ioan92

181 me gusta en 125 mensajes.

Grupo: 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) descargado 686 vez(es).
I keep all my attention, and I thank in advance for any critics and improvement suggestions.

Best Regards,
Ioan


Editado 10/4/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
A 2 usuarios les gustó este mensaje
sergio 10/4/2026 19:16:34, Alvaro 11/4/2026 16:45:58
  • Nuevos mensajes
  • Sin mensajes nuevos