Qurak

Use a rule with an expression more than once

How-to 6 steps, run in order in one session. Every step was executed against the engine and the output below is what it produced.

Step 1
a + x ^ 2 + y ^ 6 /. {x -> 2 + a, a -> 1}
Output
1 + (2 + a)^2 + y^6
Step 2
a + x ^ 2 + y ^ 6 //. {x -> 2 + a, a -> 1}
Output
10 + y^6
Step 3
log[a b c d] /. log[x_ y_] -> log[x] + log[y]
Output
log[a*b*c*d]
Step 4
log[a b c d] //. log[x_ y_] -> log[x] + log[y]
Output
log[a*b*c*d]
Step 5
ReplaceRepeated[x, x -> x + 1, MaxIterations -> 1000]
Output
1000 + x
Step 6
ReplaceList[log[a b c], log[x_ y_] -> log[x] + log[y]]//Column
Output
Column[{}]

Functions used

Related recipes

All recipes · Function reference · Use this from an MCP client