Hi waddington!
This equation can be solved in the following way. I'll assume here
that the -Z is not part of the denominator of the fraction in the
exponent, so your equation would look like this:
1
Y = --------------------------
1 + exp( -X(X-1)/2 ) - Z
We start by taking the reciprocal,
1/Y = 1 + exp( -X(X-1)/2 ) - Z
Substract (1-Z),
1/Y - 1 + Z = exp( -X(X-1)/2 )
Take natural logarithm,
ln( 1/Y - 1 + Z ) = -X(X-1)/2
Multiply by -2,
-2ln( 1/Y - 1 + Z ) = X(X-1) = X^2 - X
And finally, setting C = 2ln( 1/Y - 1 + Z ), and adding C,
X^2 - X + C = 0
This equation can be solved using the quadratic equation formula, so
we get the following two possible solutions for X:
X1 = ( 1 + sqrt(1 - 4C) )/2
X2 = ( 1 - sqrt(1 - 4C) )/2
where C=2ln(1/Y - 1 + Z). Bear in mind that, if Y and Z are constants,
they should be set such that
1/Y - 1 + Z > 0
otherwise, the equation has no solution.
I hope this helps!
Best wishes,
elmarto |
Clarification of Answer by
elmarto-ga
on
11 Mar 2005 09:19 PST
Hi waddington,
While the correct equation is a bit different, the procedure for
solving it is much the same. I'll copy my original answer here and
update the equations when appropiate:
We start by taking the reciprocal,
1/Y = 1 + exp( -X(X-1)/2 + Z )
Substract 1,
1/Y - 1 = exp( -X(X-1)/2 + Z )
Take natural logarithm,
ln( 1/Y - 1 ) = -X(X-1)/2 + Z
Subtract Z,
ln( 1/Y - 1 ) - Z = -X(X-1)/2
Multiply by -2,
-2(ln(1/Y - 1) - Z) = X(X-1) = X^2 - X
And finally, setting C = 2(ln(1/Y - 1) - Z) , and adding C,
X^2 - X + C = 0
This equation can be solved using the quadratic equation formula, so
we get the following two possible solutions for X:
X1 = ( 1 + sqrt(1 - 4C) )/2
X2 = ( 1 - sqrt(1 - 4C) )/2
where C=2(ln(1/Y - 1) - Z). Bear in mind that, if Y and Z are constants,
they should be set such that
1/Y - 1 > 0
otherwise, the equation has no solution.
Best regards,
elmarto
|