2

$$x / y = a + b \log(y)$$

Above is a relation between x and y. I have x. How do I find y ? Given: a and b are constants.

a is 0.710 while b is -0.014

MycrofD
  • 231

2 Answers2

2

For a given value of $x$, you want to solve for $y$ $$x / y = a + b ~ \log(y)$$ $a$ and $b$ being given constants. So, for example, let us write the equation as $$f(y)=y \Big( a + b ~ \log(y) \Big)-x$$ and you search $y$ such that $f(y)=0$.

A simple method for this kind of problem is Newton scheme which, starting from a guess $y_0$ will generate iterates according to $$y_{n+1}=y_n-\frac {f(y_n)}{f'(y_n)}$$ So, let us be very lazy and start iterating at $y_0=1$ using your values for $a$ and $b$ and $x=10$. The succesive iterates will then be $14.3477$, $14.8763$, $14.8765$ which is the solution for six significant figures.

  • Thank you! I wish I could know how we can solve by Lambert W function. Even you presented a different equation than the first answer by @RobertIsrael. So how does that work? – MycrofD May 23 '14 at 09:09
  • There are two real solutions in this case: the other is approximately $1.05909 \times 10^{22}$. – Robert Israel May 23 '14 at 14:44
  • To use the Lambert W function, you need software (generally a computer algebra system such as Maple or Mathematica or Sage) that has it. Or you can use Wolfram Alpha online. – Robert Israel May 23 '14 at 14:48
  • What if I become lazier still and start iterating at $y_0 = 0$ instead of $1$ as shown, or with some other value? I mean what is it that decides which value to iterate with initially? More clarification please. @RobertIsrael and ClaudeLeibovici – MycrofD May 25 '14 at 06:26
  • $y_0 = 0$ won't work because $f$ has a singularity there ($\lim_{y \to 0+} f(y) = 0$ but $\lim_{y \to 0+} f'(y)$ is infinite). Other starting points are ok, as long as you don't run into negative values of $y$. – Robert Israel May 25 '14 at 21:30
  • Ok, sir. I am getting to learn so much here. Another small doubt. It is not necessary that my starting guess has to be less than my possible answer, is it? It can be greater too, right? @RobertIsrael – MycrofD May 27 '14 at 12:18
  • Correct. As long as the starting guess is sufficiently close to a solution, it will converge to that solution. – Robert Israel May 28 '14 at 01:45
1

The solution requires the Lambert W function.

$$ y = \exp\left(W(x e^{a/b}/b) - a/b\right)$$

Robert Israel
  • 448,999