Dealing with long line formulas

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

#1 已发布: 2026/4/4 10:11:11
ioan92

ioan92

181个赞,共124个帖子。

组: 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)已下载 605 次。
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


已编辑 2026/4/5 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 已发布: 2026/4/5 10:34:21
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: 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)已下载 601 次。
已编辑 2026/4/5 10:38:50
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1位用户喜欢此帖子
ioan92 2026/4/5 15:22:49
#3 已发布: 2026/4/5 17:33:47
ioan92

ioan92

181个赞,共124个帖子。

组: 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)已下载 637 次。
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 已发布: 2026/4/5 21:01:04
overlord

overlord

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

组: Moderator

I did proposed a better solution several years ago.

https://smath.com/en-US/forum/topic/vTrsUs/Equation-Wrapping#msg128281
1位用户喜欢此帖子
ioan92 2026/4/6 07:27:33
#5 已发布: 2026/4/6 07:39:29
ioan92

ioan92

181个赞,共124个帖子。

组: 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 已发布: 2026/4/6 07:58:39
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: 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 2026/4/6 11:27:54
#7 已发布: 2026/4/6 12:56:35
ioan92

ioan92

181个赞,共124个帖子。

组: 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 已发布: 2026/4/6 16:59:17
Martin Kraska

Martin Kraska

1,362个赞,共2,276个帖子。

组: Moderator

This is just native Maxima.

grafik.png
已编辑 2026/4/6 17:00:14
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
1位用户喜欢此帖子
ioan92 2026/4/7 08:57:51
#9 已发布: 2026/4/6 18:11:02
Alvaro

Alvaro

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

组: 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)已下载 607 次。

Best regards.
Alvaro.
1位用户喜欢此帖子
ioan92 2026/4/7 13:34:05
#10 已发布: 2026/4/6 19:53:13
ioan92

ioan92

181个赞,共124个帖子。

组: 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)已下载 667 次。
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 已发布: 2026/4/6 20:34:56
ioan92

ioan92

181个赞,共124个帖子。

组: 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 已发布: 2026/4/10 17:20:44
ioan92

ioan92

181个赞,共124个帖子。

组: 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)已下载 702 次。
I keep all my attention, and I thank in advance for any critics and improvement suggestions.

Best Regards,
Ioan


已编辑 2026/4/10 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位用户喜欢此帖子
sergio 2026/4/10 19:16:34, Alvaro 2026/4/11 16:45:58
  • 有新帖
  • 无新帖