Substitute an equation

If I have two equations how do I combine them?

Do I have to write something like this or is there a shorter way? Maybe something like solve(eq1,eq2,a)?

using Symbolics
@vars a b c
eq1 = ( a = b + c)
eq2 = ( b = 3c - a)
substitute(eq1,eq2.lhs => eq2.rhs)

Are you looking for solve_for?

2 Likes

Perfect! How did I miss this.

It was wearing a fake mustache.

2 Likes