solve nonlinear equation with logarithms We were asked to find the inflection points of:

$$f(x) = x^\frac{1}{x}$$

After a lot of derivation I reached:

$$f''(x)=x^{1/x} \left( \frac{\ln^2(x)+2x\ln(x)-2\ln(x)-3x+1}{x^4} \right)$$

I don't know how to separate the $x$'s from the terms containing $\ln(x)$.

Alternatively, we are allowed to use Taylor Series expansions for $\ln(1+x)$ but if there is a way to do it I wasn't able to find it. And I'd love to learn.

And ideas?

Thanks
The question has been changed, but I stick to analysing the numerator of the new $f$ in the question, since as the questioner has rightly pointed out, it is the significant part of the function when it comes to finding roots.


First and foremost, let $f(x) = \ln^2(x) + 2x\ln x - 2\ln x -3x+1$ (Since the question has changed, I apologize for retaining notation). Note that the dominating term in $f(x)$ (the term which,for sufficiently large $|x|$, is the largest contributor) is $x \ln x$. Hence, as $x\to \infty$, $f(x) \to \infty$. Also, as $x\to 0$, this function is dominated by $\ln^2 x$, which is positive, so we know how the graph of this function looks at the end points: it comes crashing down from infinity as we start moving right from zero, and certainly flies off to infinity as $x \to \infty$.

As usual, without techniques of calculus we'd be nowhere on this one. 

Find the double derivative, it is just $\frac{2}{x^2}(x-\log(x)+2)$. Note that if $x&gt;0$, the fraction is anyway positive. For the other expression, use calculus again : differentiating gives that the extrema must satisfy $1 - \frac 1x = 0$ so $x=1$ but at $x=1$ this expression is just $3$. Therefore, the function is a product of positive functions and hence is positive.

Therefore, since the double derivative is strictly positive, we see that the first derivative,  which is initially negative and later positive (I leave you to see this by actual differentiation) will increase strictly and therefore attain a zero at precisely one point.

A final observation is that $f(x)$ must have some roots : $f(1) = -2$ , so in fact $f$ must have at least two roots, by the intermediate value theorem.

However, $f$ must have exactly two distinct roots, since if there were more than $3$, then by Rolle's theorem $f'$ would be zero at two points, a contradiction to our earlier statement.

Therefore, $f$ has precisely two roots in the interval $(0,\infty)$.  

Nothing more can be said analytically. I am sure that convexity of $f$ will allow the use of excellent approximation algorithms for finding the roots, but other than evaluation you do not expect to find anything further revealing about the roots of $f$.

As it turns out, $x = 0.582$ and $x = 4.368$ would solve this equation, and are the inflection points of $x^{\frac 1x}$ also.
Using the quadratic formula with $a=1$, $b=2x-2$ and $c=1-3x$ you can separate the ln(x) from the x's and get,
$$ln(x) = \frac{2-2x \pm \sqrt{(2x-2)^2 -4(1)(1-3x)}}{2}$$

$$ln(x)=1-x \pm \sqrt{x^2+x}$$