1
$\begingroup$

I have a simple expression:

s=4a(x+y)^3

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?

$\endgroup$
3

1 Answer 1

2
$\begingroup$

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

$\endgroup$

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