0

I have a very complex math formula/equation which involves exponential.

Formula: X + 2 = Y

*PS: The above is just an example to illustrate my problem. The real formula is way more complex than this.

There is no way for me to form an equation with X variable on the left like X = Y - 2. I tried professional Math software like Maxima and Mathematica to solve the equation but failed.

I was given the value of Y, how can I find/estimate the value of X?

My current idea is start looping X = 1 and increase X's value with a fixed increment in each loop and try to match my value Y. The only relationship I have now is that the greater value of X generates a smaller value of Y.

Is there any good algorithm out there for my problem?

Wilts C
  • 103
  • 2
  • This is an algebra problem: solve for X. You need to refactor the equation to isolate Y, and then code that. In this case, X = Y -2. – Matthew Flynn Jun 11 '16 at 04:42
  • @MatthewFlynn I had solved this problem. Just to let you know that my formula is way complex than what you can think of. It involves x^2, x^6, x^-0.09, x^-0.21 and lots of sqrt. Anyway it's solved with root finding algorithm. – Wilts C Jun 11 '16 at 05:42

1 Answers1

1

If the equation cannot be solved analytically, you need to use numerical algorithm. To make it simple rewrite the equation into form of X + 2 - Y = 0.

Then, it becomes a problem of finding a root of equation using numerical method.

Euphoric
  • 36,735
  • 6
  • 78
  • 110