I have a simple expression:


I want to express s in terms of b where b=x+y. That is s will become 4ab^3. How to achieve this in Mathematica?


1 Answer 1


Already mentioned in the comments(nothing new) by @corey979 and @Artes.

In[49]:= Clear[s, b]

Solve[{s == 4 a (x + y)^3, b == x + y}, s, {x, y}]

Out[50]= {{s -> 4 a b^3}}

Ref: Rewriting expression in terms of factor, Thanks to MarcoB


Not the answer you're looking for? Browse other questions tagged or ask your own question.