# solve an equation in terms of an expression?

Hi,

Not entirely sure if I worded the subject line of this question right, Essentially what I am trying to do is rearrange an equation based on what I want on the left hand side of it, for example:

I have defined my variables:

```
var('v_o, v_i, delta, T, v_d, v_c')
```

Entered my equation:

```
eqn1= v_i * delta * T == v_o + v_d + v_c - v_i * (1-delta) * T
```

Made a substitution:

```
eqn2 = eqn1.substitute(v_c=v_i)
```

and now, with minimum possible effort I would like sage to put it in the form of:

```
delta/(1-delta)=...
```

Many thanks to anyone who's even read this far down, Any help would be much appreciated