# Solving Equation Difficulty (analytically or by plotting)

I found this interesting problem in a programming forum. It would be great to get some help..

Solve for $K$,

$K-1 \leq 27\cdot\log_{10}(9(K-1))$

We plotted it to find that $K\leq77$. Can you solve this one using paper and pencil?

Thanks!

-

In general, I imagine there is no easy solution. In this case, you can determine some bounds, although I'm not sure I could consider this any less 'brute force' than just evaluating the expression.

Let $f(x) = x-1-27\cdot\log_{10}(9(x-1))$. $f$ is defined on $(1,\infty)$. You are looking for integers in $(1,\infty)$ that satisfy $f(x) \leq 0$, hence we may restrict our attention to $[2,\infty)$.

Differentiating $f$ gives $f'(x) = 1-\frac{27}{(x-1)\ln 10}$, and $f''(x) = \frac{27}{(x-1)^2\ln 10}$, hence $f$ is strictly convex on $[2,\infty)$, and $\lim_{x\to \infty} f(x) = + \infty$.

Solving $f'(x_{min}) = 0$ yields $x_{min} = 1+\frac{27}{\ln 10} \approx 12.7$. Since $f(2) < 0$, we have that $f$ is strictly decreasing on $[2,12]$, and strictly increasing (to $\infty$) on $[13, \infty)$ (it is easy to check that $f(13) < 0$). Hence we know that $f(x) = 0$ has a unique solution on $[13,\infty)$, denote this unique solution by $\hat{x}$.

Since $f$ is strictly convex and $\lim_{x\to \infty} f(x) = + \infty$, using Newton's method to solve $f(x) = 0$, starting at $x_0 = 13$, will produce a sequence $x_n$ of iterates that satisfy $x_n \geq \hat{x}$ (for $n> 0$), and $x_{n+1} \leq x_n$. Furthermore, these iterates will converge quadratically (ie, very quickly) to the solution. It is easy to check that $x_4 \approx 77.6$, and since $f(77) < 0$ and $f(78) > 0$, this means that the integer solutions to $f(x) \leq 0$ are $\{2,...,77\}$.

-

You can actually go a bit higher than 77, I think there is no exact way to solve this, you must use numerical approximation. A quick play around with google calculator gives $K \leq 77.645721$ to 6 decimal places.

-
Assume K to be an integer. So that one is fine.. But what kind of approximation techniques did you use? – Maverickgugu Jun 22 '12 at 11:12
If $K$ is an integer then it is not difficult to solve by trial and error. I just played around putting numbers in. Replace $K-1$ with $x$ then rearrange to get $27\text{log}_{10}(9x) - x \geq 0$. Now the LHS becomes a decreasing function after some number around $10$ so it is enough to just put higher and higher numbers in for $x$ until the inequality fails, then manipulate the decimals accordingly. There are much better methods but this is a rough marker of where the upper bound is. – fretty Jun 22 '12 at 11:20
So for example when $x=76.6$ the inequality works but when $x=76.7$ it fails, so the upper bound must be between the two. Next I try to d the same for the second decimal places, I find that the upper bound must lie inbetween $76.64$ and $76.65$... – fretty Jun 22 '12 at 11:22
It would be awesome if one can point out such methods (beating brute force) to find where that upper bound is.. – Maverickgugu Jun 22 '12 at 11:22
Well the thing is...we might not be able to find it explicitly. There is no guarantee that the solution is some specially defined number. I cannot find a way to get a closed form solution, but maybe others on here might be able to. If not then we have to make do with approximations. – fretty Jun 22 '12 at 11:31