Here $a,b,c$ are any real numbers. We can use graphical methods using Mathematical tools, but what are the other techniques ?
-
1Are you looking for numerical solutions or exact solutions? – πr8 Apr 25 '16 at 13:34
-
numerical solutions – Neeraj Singh Aithani Apr 25 '16 at 13:36
-
If you write $\arg \min\limits_{x} |1/x + b \cdot \log x - c|^2$ you may try to solve a minimization problem. – them Apr 25 '16 at 13:40
-
I am solving a thermodynamics problem, but in the exam i can't use a computer. – Neeraj Singh Aithani Apr 25 '16 at 13:42
-
1Note that if you change $y=1/x$ in the second equation you get an equation like the first: $ay-b\log y = c$. – Thomas Andrews Apr 25 '16 at 13:43
-
yes both are the same type of equations – Neeraj Singh Aithani Apr 25 '16 at 13:44
1 Answers
The equation can potentially have two solutions if $a$ and $b$ have different signs - then the slope of the function $g(x)=ax+b\log x$ is both positive and negative at some points, so, for some $c$, the equation has two solutions.
If $a,b$ have the same sign, then $g(x)$ is strictly monotonic, and approaches the infinities as $x\to 0,+\infty$, so every $c$ has exactly one solution.
If $a$ and $b$ have different signs, then $g$ has has either a strict maximum or minimum at $x=-\frac{b}{a}$, and so for some $c$ there are no solutions.
The exact solution is in terms of the "Lambert $W$-function."
Divide the first by $b$ and exponentiate, and you've got:
$$xe^{\frac{ax}{b}}=e^{c/b}$$
Multiply both sides by $\frac{a}{b}$ and let $z=\frac{ax}{b}$ and you have:
$$ze^z = \frac{a}{b}e^{c/b}$$
So $z=W\left(\frac{a}{b}e^{c/b}\right)$ where $W$ is the Lambert $W$-function, and thus:
$$x=\frac{b}{a}W\left(\frac{a}{b}e^{c/b}\right)$$
That doesn't really help you compute $x$, however, unless your calculator and/or computer has a method for computing the $W$-function.
You might try something iterative. Let $x_0$ be an approximate solution.
Define: $$x_{n+1}=\frac{c-b\log x_n}{a}$$
If that converges, then it converges to a solution, I'd guess fairly quickly.
Otherwise, Newton-Raphson. Let $f(x)=ax+b\log x-c$ then $$x_{n+1}=x_n -\frac{f(x_n)}{f'(x_n)} = x_n-\frac{ax_n+b\log x_n-c}{a+b/x_n}=\frac{x_n(b+c-b\log x_n)}{ax_n+b}$$
(The second class of equations is the same, essentially, as the first - letting $y=1/x$ you have $ay-b\log y = c$.)
- 177,126