Gustavomcls
Gustavomcls

Reputation: 1655

simple replacement of variables on wolfram-mathematica

I would like to make a simple replacement or substitution: y=a+b a=2d+e b=f+g How make Wolfram-Mathematica automatically show and make the substitution or replacement of variables a and b an show this result: y=2d+e + f+g

?

Upvotes: 0

Views: 4401

Answers (1)

Bill
Bill

Reputation: 3967

Try

y==a+b/.{a->2d+e,b->f+g}

and see if that is what you are looking for.

That takes the expression y==a+b and does the list of substitutions to it

Upvotes: 2

Related Questions