# Eliminate Parameters [closed]

I want to simplify the solutions to two equations with two unknowns:

x =.; p1 =.; p2 =.; y =.; m =.;
m1 =.; m2 =.;
R =.;
R1 =.; R2 =.;
ρ1 =.; ρ2 =.;
σ =.;

(*The equations*)

eq1 = x p1 m1 + y p2 m2 - m;
eq2 = x R1 m1 + y R2 m2;

a = FullSimplify[Solve[{eq1 == 0, eq2 == 0}, {m1, m2}]];
Print["solution:  ", FullSimplify[a]];


After getting the solutions for m1 and m2, I want to simplify them using 3 other equations:

{-(p2/p1) ((m)/x y)/(p1 R2 -  p2 R1) == σ ,
- R2 y p1/p2 == ρ1  ,
R1 x p1/p2 == ρ2


I want the solution in a to be just in terms of [Sigma], [Rho]1 and [Rho]2. In fact, the answer must be m1=[Sigma].[Rho]1 and m2=[Sigma].[Rho]2. I used the Eliminate:

b = FullSimplify[
Solve[Eliminate[{m1 == -((m R2)/(p2 R1 x - p1 R2 x)),
m2 == (m R1)/(p2 R1 y - p1 R2 y), -(p2/p1) ((m)/x y)/(p1 R2 -
p2 R1) == σ, -R2 y p1/p2 == ρ1,
R1 x p1/p2 == ρ2}, {   y, m, R1, R2}], {m1, m2 }]];

Print["solution:  ", FullSimplify[b]]


But this code eliminates σ too and gives me: solution:{{m2->(m1 ρ2)/ρ1}} But the answer is m2=σρ2 and m1=σρ1, instead. Does anyone know how I can keep σ in my results too?

• I'm voting to close this question as off-topic because it is too localized; i.e, it applies only to the local situation and needs of its poster and answers will not benefit others. Commented May 24, 2017 at 4:40

The result is not as you expect. It is

eq1 = x p1 m1 + y p2 m2 - m;
eq2 = x R1 m1 + y R2 m2;

a = FullSimplify[Solve[{eq1 == 0, eq2 == 0}, {m1, m2}]]

(*   {{m1 -> -((m R2)/(p2 R1 x - p1 R2 x)),
m2 -> (m R1)/(p2 R1 y - p1 R2 y)}}    *)

b = Solve[{-(p2/p1) ((m)/x y)/(p1 R2 - p2 R1) == Sigma, -R2 y p1/
p2 == Rho1, R1 x p1/p2 == Rho2}, {m, x, y,}]

(*   {{m -> (p1 R2 (-p2 R1 + p1 R2) Rho2 Sigma)/(p2 R1 Rho1),
x -> (p2 Rho2)/(p1 R1), y -> -((p2 Rho1)/(p1 R2))}}   *)

c = Solve[{-R2 y p1/p2 == Rho1, R1 x p1/p2 == Rho2}, {R1, R2}]

(*   {{R1 -> (p2 Rho2)/(p1 x), R2 -> -((p2 Rho1)/(p1 y))}}    *)

{m1, m2} /. a /. b /. c // Simplify // Flatten

(*   {(Rho1 Sigma)/y^2, (Rho2 Sigma)/y^2}   *)