I am new to Mathematica and am afraid this is a silly question. I have this very easy substitution, it has three equations on three unknowns {w1, l1, t1}
. I want to substitute the first two equations into the the third one, so that everything is in terms of w1 and then solve for w1. In pen and paper this is simple. I have tried many ways to do this with mathematica but Solve just stalls. Any suggestions as to how I could isolate w1?
Equations
l1w1optlag = Flatten[Solve[MRSw1andl1 == 0, l1]]
{l1 -> (pw^2 w1)/((1 + a e1)^2 w^2)}
t1w1optlag = Flatten[Solve[MRSw1andt1 == 0, t1]]
{t1 -> (pw^2 w1)/((1 + a e1)^2 r^2)}
focwrtlam == 0
1 - (Sqrt[l1]/d + Sqrt[t1]/d + Sqrt[w1]/d)^2 == 0
All I want to do is plug the first two equations on the the third one and solve for w1. Notice that I am getting rules for the first two equations. I have tried converting these rules to equations or evaluating the third expression with these rules and solving it as follows but it doesn't work:
Solve[focwrtlam == 0 /.t1w1optlag /.l1w1optlag,w1]
(1 - (Sqrt[l1]/d + Sqrt[t1]/d + Sqrt[w1]/d)^2 == 0) /. {l1 -> (pw^2 w1)/((1 + a e1)^2 w^2), t1 -> (pw^2 w1)/((1 + a e1)^2 r^2)}
$\endgroup${l1, t1}
and plug solution(s) into third. $\endgroup$