Question: Simplifying Repetitive Terms in Multiple Equations

I’m trying to simplify the results I obtained from two scenarios. In the first scenario, I have results labeled g1,g2,g3​, and in the second scenario, I have g_1, g_2, g_3​. The issue is that the expressions are quite lengthy, and I want to shorten them by identifying and substituting common sub-expressions.

Is there a method or syntax that can help me automatically detect repeated terms and substitute them with a variable to improve readability?

For example:

Let’s say:

x=2f+3d+4(d+h+k)j+f

y=1(d+h+k)+hf+4d

Here, the expression d+h+k appears in both x and y, so I can define a new variable:

A=d+h+k

and substitute it into the equations to make them more concise and readable.

Attaching the sheet: Difference_two_model.mw

Please Wait...