On Feb 18, 2008 12:12 PM, Marco Carmosino <mogunus at gmail.com> wrote:
> (%i29) log2(x) := log(x)/log(2)
> (%i84) eq1 : y = 64*n*log2(n)$
> (%i85) eq2 : y = 8*n^2$
>
Maxima cannot solve this system of equations symbolically because it is not
solvable in closed form. Using the eliminate function, you can reduce it to
an equation in n only:
eq12: eliminate([eq1,eq2],[y]); => [8*n*(8*log(n)-log(2)*n)]
If you use solve on the result, you get
sols: solve(eq12,n) => [n = 0,n = 8*log(n)/log(2)]
The first solution is correct (despite the log(n) term...); the second is a
transcendental equation and can't be solved symbolically using the usual
elementary functions. At this point, you can use find_root:
find_root(sols[2],n,.1,10) => 1.10
find_root(sols[2],n,10,100) => 43.56
I believe someone is working on a more automated root-finder, but this
should work for now.
-s