In certain problems, we need to solve systems of equations and get results in terms of just selected variables. For example, how could we solve eqn==0
below for c3
and c4
expressed in terms of c1
and c2
only, without a1
or a2
?
eqn = {{c1, c2}, {c1, c3}, {c1, c4}, {c2, c3}}.{a1, a2} - {5, 2, -4, -3}
We can select two equations from the system and solve them for a1
and a2
, then substitute those results back in...
asoln = Solve[eqn[[{1, 2}]] == 0, {a1, a2}];
b = eqn /. asoln;
Solve[b == 0, {c3, c4}]
(* {{c3 -> 1/5 (3 c1 + 2 c2), c4 -> 1/5 (9 c1 - 4 c2)}} *)
This approach works but it requires that we find a subset of equations from which a1
and a2
can be solved for unambiguously, which might be difficult. Is it possible to make Solve[]
eliminate a1
and a2
for us?
Solve[Eliminate[eqn == 0, {a1, a2}], {c3, c4}]
? $\endgroup$Solve
orReduce
I think it should go in the older Q&A; or is it a different approach to the same problem? $\endgroup$