1 | initial version |

You can't : your solution involves `xa2`

, which doesn't appear in the definition of `R1`

and `R2`

; `xa2`

is an independent quantity.

May I suggest proofing your problem ?

2 | No.2 Revision |

You can't : your solution involves `xa2`

, which doesn't appear in the definition of `R1`

and `R2`

; `xa2`

is an independent quantity.

May I suggest proofing your problem ?

**EDIT :** After typo correction, it's clearer. And CAN be solved. Let's rewrite the problem a bit:

```
xa1, xa2, xb1, xb2, a, b, R1, R2 = var('xa1, xa2, xb1, xb2, a, b, R1, R2')
Ua = xa1^a * xa2^b
Ub = xb1^a*xb2^b
MUa1=Ua.diff(xa1)
MUa2=Ua.diff(xa2)
MUb1=Ub.diff(xb1)
MUb2=Ub.diff(xb2)
MRSA=MUa1/MUa2
MRSB=MUb1/MUb2
Sol=solve([MRSA==MRSB],xa1)
```

Let's define R1 and R2 by *equations*, not assignments :

```
E1=R1==xa1+xb1
E2=R2==xa2+xb2
```

Your solution is :

```
sage: Sol
[xa1 == xa2*xb1/xb2]
```

We can solve `E1`

and `E2`

for `xa1`

and `xa2`

(thus getting tid of th`,`

R2`and`

xb2` :em) :

```
sage: solve([E1,E2],[xa1,xa2])[0]
[xa1 == R1 - xb1, xa2 == R2 - xb2]
```

Let(' substitute that into your solution :

```
sage: Sol[0].subs(solve([E1,E2],[xa1,xa2])[0])
R1 - xb1 == (R2 - xb2)*xb1/xb2
```

which gives us `xb1`

as a function of `R1`

, `R2`

and `xb1`

:

```
sage: Sol[0].subs(solve([E1,E2],[xa1,xa2])[0]).solve(xb1)
[xb1 == R1*xb2/R2]
```

which if I understand you correctly,is the result you sought.

HTH,

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.