Google Answers Logo
View Question
 
Q: solve a math equation ( Answered 5 out of 5 stars,   2 Comments )
Question  
Subject: solve a math equation
Category: Science > Math
Asked by: waddington-ga
List Price: $10.00
Posted: 11 Mar 2005 07:49 PST
Expires: 10 Apr 2005 08:49 PDT
Question ID: 492538
Solve Y=1/(1+e^-(X(X-1)/2-Z))for X.
Answer  
Subject: Re: solve a math equation
Answered By: elmarto-ga on 11 Mar 2005 08:50 PST
Rated:5 out of 5 stars
 
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

Request for Answer Clarification by waddington-ga on 11 Mar 2005 09:12 PST
I see I didn't write it clearly what I had as:
               1
Y = --------------------------
     1 + exp( -X(X-1)/2 ) - Z

should have been
               1
Y = --------------------------
     1 + exp((-X(X-1)/2)+Z)

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
waddington-ga rated this answer:5 out of 5 stars and gave an additional tip of: $5.00
Thank you.

Comments  
Subject: Re: solve a math equation
From: windoffire-ga on 11 Mar 2005 08:24 PST
 
Reciprocal, subtract one, add natural log, and multiply by -1 puts us here:

-(ln(1/Y)+1)=X(X-1)/2-Z

Multiply out and Multiply by (2-Z) puts us here:

-(ln(1/Y)+1)(2-Z)=x^2-x

Anyone else want to finish?
Subject: Re: solve a math equation
From: elmarto-ga on 12 Mar 2005 11:48 PST
 
Thank you for the tip!

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy