1 | initial version |
You could try solving for delta
and then just compute delta/(1-delta)
. However, in the equation eqn1
you've given delta
cancels out on both sides so it isn't possible to solve for it. Here's a simplified example:
sage: a,b,c,d = var('a,b,c,d')
sage: eqn1= a * d == b - a * (1-d)
sage: eqn1
a*d == (d - 1)*a + b
sage: solve(eqn1, d)
[]
Which means that any value of d
is a solution. So maybe you've got a typo in your equation. If, for example, you start with the $a * d == b + a * (1-d)$ --notice that I changed one of the signs on the right hand side-- and you want to derive an expresion for $d/(1-d)$ you could do:
sage: a,b,c,d = var('a,b,c,d')
sage: eqn1= a * d == b + a * (1-d)
sage: S = solve(eqn1, d); S
[d == 1/2*(a + b)/a]
sage: soln_d = S[0].rhs(); soln_d
1/2*(a + b)/a
sage: soln_d / (1 - soln_d)
-(a + b)/(((a + b)/a - 2)*a)