How do I calculate an $x \ge 0$ such that $\log_2(x + 100) - \sqrt{x + 100} + \sqrt{x} \ge 0$?

70 Views Asked by At

I have this kinky function $$ f(x) = \log_2(x + 100) - \sqrt{x + 100} + \sqrt{x}. $$ How do I calculate the value of $x$ $a$ such that $f(x) \ge 0$ on $x \in [a, \infty)$ and $f(x) < 0$ on $[0, a)$?

1

There are 1 best solutions below

0
On BEST ANSWER

The $a$ you seek is the root of $f(x)$, i.e. where $f(x) = 0$. $f(x)$ is nonlinear, so the root must be found numerically. We can do so using Newton's method. In this method an initial estimate $x_0$ of the root is repeatedly improved by the following algorithm:

$$ x_{n + 1} = x_n - \frac{f(x_n)}{f'(x_n)} $$

Now we go through the process of computing the root $a$. We first take the derivative of $f$, getting:

$$ f'(x) = \frac{1}{\ln 2} \frac{1}{x + 100} - \frac{1}{2} \frac{1}{\sqrt{x + 100}} + \frac{1}{2} \frac{1}{\sqrt{x}}$$

Now we apply the algorithm. We start with an initial estimate $x_0 = 25$. We now compute $x_1$:

$$ x_1 = 25 - \frac{0.785}{0.0668} = 13.245 $$

So the new estimate of the root is $13.245$. Computing the next value $x_2$:

$$ x_2 = 13.245 - \frac{-0.179}{0.103} = 14.980 $$

And after one more iteration we get:

$$ x_3 = 14.980 - \frac{-0.00719}{0.0951} = 15.0561 $$

So the current estimate of the root $a$ after $3$ iterations is $15.0561$, so $a = 15.061$. We can repeat the process to get more precise estimates.