about solve()



 

> 
> I have function f(x). I can't get certain value of f(x)=0 
> from solve().
> Why is it solved with sin(x) in answer?
> 
> (%i56)  f(x):=144 * sin(x) + 12*sqrt(3)*%pi + 36*x^2 + %pi^2 
> - 72 - 12*%
> pi*x - 72*sqrt(3)*x$
> 
> (%i57) solve(f(x));
>               6 sqrt(5 - 4 sin(x)) - %pi - 6 sqrt(3)
> (%o57) [x = - --------------------------------------, 
>                                 6
>     6 sqrt(5 - 4 sin(x)) + %pi + 6 sqrt(3)
> x = --------------------------------------]
>                     6
> 
> 
> I want to get something like this:
> 
> (%i58) find_root(f(x),x,0.3,0.7);
> (%o58)                         0.52360846201579
> 
> -- 
You might try implementing Newton-Raphson.
http://numericalmethods.eng.usf.edu/ebooks/newtonraphson_03nle_ebook.htm
I'm really surprised that Maxima doesn't have a package to do this.  The
simplest form is really easy; but there are pitfalls, which is the
reason for the long article above.  Octave (a free version of Matlab)
has a solve(f(x)=0,x) implemented that seems to work pretty well.

RRogers