Dealing with long line formulas

Dealing with long line formulas - Searching for a matrix equivalent represetation tool - Сообщения

#1 Опубликовано: 04.04.2026 10:11:11
ioan92

ioan92

179 сообщений из 120 понравились пользователям.

Группа: 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 КиБ) скачан 42 раз(а).
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


Отредактировано 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 Опубликовано: 05.04.2026 10:34:21
Martin Kraska

Martin Kraska

1 341 сообщений из 2 256 понравились пользователям.

Группа: 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 КиБ) скачан 29 раз(а).
Отредактировано 05.04.2026 10:38:50
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1 пользователям понравился этот пост
ioan92 05.04.2026 15:22:49
#3 Опубликовано: 05.04.2026 17:33:47
ioan92

ioan92

179 сообщений из 120 понравились пользователям.

Группа: 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 КиБ) скачан 25 раз(а).
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 Опубликовано: 05.04.2026 21:01:04
overlord

overlord

590 сообщений из 1 365 понравились пользователям.

Группа: Moderator

I did proposed a better solution several years ago.

https://smath.com/en-US/forum/topic/vTrsUs/Equation-Wrapping#msg128281
1 пользователям понравился этот пост
ioan92 06.04.2026 07:27:33
#5 Опубликовано: 06.04.2026 07:39:29
ioan92

ioan92

179 сообщений из 120 понравились пользователям.

Группа: 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 Опубликовано: 06.04.2026 07:58:39
Martin Kraska

Martin Kraska

1 341 сообщений из 2 256 понравились пользователям.

Группа: 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 пользователям понравился этот пост
ioan92 06.04.2026 11:27:54
#7 Опубликовано: 06.04.2026 12:56:35
ioan92

ioan92

179 сообщений из 120 понравились пользователям.

Группа: 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 Опубликовано: 06.04.2026 16:59:17
Martin Kraska

Martin Kraska

1 341 сообщений из 2 256 понравились пользователям.

Группа: Moderator

This is just native Maxima.

grafik.png
Отредактировано 06.04.2026 17:00:14
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1 пользователям понравился этот пост
ioan92 07.04.2026 08:57:51
#9 Опубликовано: 06.04.2026 18:11:02
Alvaro

Alvaro

1 083 сообщений из 1 756 понравились пользователям.

Группа: 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 КиБ) скачан 24 раз(а).

Best regards.
Alvaro.
1 пользователям понравился этот пост
ioan92 07.04.2026 13:34:05
#10 Опубликовано: 06.04.2026 19:53:13
ioan92

ioan92

179 сообщений из 120 понравились пользователям.

Группа: 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 КиБ) скачан 17 раз(а).
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 Опубликовано: 06.04.2026 20:34:56
ioan92

ioan92

179 сообщений из 120 понравились пользователям.

Группа: 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 Опубликовано: 10.04.2026 17:20:44
ioan92

ioan92

179 сообщений из 120 понравились пользователям.

Группа: 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 КиБ) скачан 3 раз(а).
I keep all my attention, and I thank in advance for any critics and improvement suggestions.

Best Regards,
Ioan


Отредактировано 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
1 пользователям понравился этот пост
sergio 10.04.2026 19:16:34
  • Новые сообщения
  • Нет новых сообщений