1. ## solving quadratic equation involving log

Hi,
How do you solve an equation with a quadratic expression on one side and a log expression on the other?
The specific question is:

2*n*log10(n) = 0.1*n^2

(Background: this is actually for an algorithm analysis question - I am trying to find the intersection points of the worst-case running times of two algorithms)

Thanks

2. ## Re: solving quadratic equation involving log

Well if you write this as

\displaystyle \begin{align*} 2n\log_{10}{n} &= 0.1n^2 \\ 0 &= 0.1n^2 - 2n\log_{10}n \\ 0 &= n(0.1n - 2\log_{10}{n}) \end{align*}

Since $\displaystyle \log_{10}{0}$ is undefined, we can't accept $\displaystyle n = 0$ as a solution, which means we have

$\displaystyle 0 = 0.1n - 2\log_{10}{n}$

You will need to use a numerical method to solve this.

3. ## Re: solving quadratic equation involving log

This is a tricky one, but maybe we can work it around a bit so the solution might be easier to find.

$\displaystyle 2n\log_{10}n = 0.1n^2$

$\displaystyle \log_{10}n = \frac{0.1n^2}{2n}$

$\displaystyle \log_{10}n = 0.05n$

$\displaystyle n = 10^{0.05n}$

You can solve it numerically from here.

4. ## Re: solving quadratic equation involving log

Thanks a lot for the fast replies.
I also got up to n = 10^(0.05*n) and did not know how to proceed any further. What is meant by solving it numerically, exactly? Does it basically mean a brute-force approach?
Cheers

5. ## Re: solving quadratic equation involving log

Yep, brute force, open up a spreadsheet you'll find $n \approx 29$