Could someone suggest simple (nonlinear) solver
Hi Guys, I'm trying to solve a single equation (of one variable) which is nonlinear. It's quite a nasty equation containing a log(x) and an exp(1/x) term as well as some polynomial terms.
Could someone please suggest a numerical scheme I could use to solve such an equation? I want something that will calculate the answer very quickly. Basically I'm trying to avoid an iterative procedure and have managed to write all my equations in terms of one unknown  this final equation is nonlinear and once I've solved it I can solve all the others. If the solution of the nonlinear eqn takes longer than the iterative procedure then the whole thing will be rather pointless. I'd be very grateful for any help you guys could provide. Bren 
Re: Could someone suggest simple (nonlinear) solve
As far as I am aware, there is no general "noniterative" solver for nonlinear equations. You may be able to find a solution technique for a particular equation, but that's what makes nonlinear equations so tough  there are no general methods for coming up with exact solutions. Unless the equation presents itself in a form that allows an exact solution I don't think you'll find a noniterative numerical technique. The only idea that comes to mind right off the bat is to see if you can implement a variable transformation that would result in an equation form that can be readily solved in an exact sense, i.e. one that would turn the existing equation into a simple polynomial form for which the roots are known.
A NewtonRaphson iterative solver is not particularly slow, unless you have an equation with a set of badly placed roots or you have no idea what to use as a starting guess. 
Re: Could someone suggest simple (nonlinear) solve
Bren, I'd like to point out that division, roots, and all the transcendental functions are implemented using iterative methods (the first two usually use Newton's method). Ignoring these iterations, it is not possible to find the roots of a general fifth (or higher) degree polynomial without iteration. In practice, the polynomial rootfinding problem is often transformed into an eigenvalue problem, but this does not work for nonpolynomial functions. Due to this duality, there is no noniterative eigenvalue procedure.
Also, it's not necessarily beneficial to eliminate as many variables as possible. That is, it's possible that the behavior of the function becomes more nasty as you eliminate variables. If you want to speed up your solver, the initial guess is where you can gain the most time. Depending on the number of independent parameters, you might benefit from a small lookup table. Or perhaps there is a heuristic to get close, or the root of the last set of equations is close because of spatial correlation. 
Re: Could someone suggest simple (nonlinear) solve
Bren, I have used maxima (an open source programme that is available on most linux distributions) to solve such equations, try it

Re: Could someone suggest simple (nonlinear) solve
many people have already commented that it might not be possible to find direct solution to your problem.
If i were you I would be trying to look of a equation whose direct solution is available and solution closely resembles the equation you have in your hand. I would use this initial guess with iterative procedure and quickly come out of it. Anyway this is only a suggestion actual implementation may even not be possible though. So consider this just as a suggestion. My 2 cents (in this recession). 
Many thanks
Thank you very much everyone  your responses have been very helpful.
I think I will give the NewtonRaphson method a whirl as I've had some luck with it in the past. I have to be able to code up the method myself (using fortran) so, unfortunately, using commercially available software isn't an option. Many thanks, Bren 
Re: Many thanks
Bren,
You don't necessarily have to start from scratch with your code! There are plenty of sources of free public domain code numerical routines around (www.netlib.org takes a bit of getting used to but has good Fortran / C codes, most (but not all) of which are public domain). A web search will find many other sources (of mixed quality of course, like anything on the internet, so be careful and test, test, test....). Certainly look at the advice in the "Numerical Recipes" books too (in most libraries have copies or free access to the older editions is available on line at http://www.nr.com/oldverswitcher.html ). They should be a good starting point.... What language will you be using? If you're lucky someone might know of a code in your language! Regards, Andy2o 
Re: Could someone suggest simple (nonlinear) solve
It's dead easy. Write an Excel spreadsheet, & iterate into solution.
Be careful to approach the solution carefully by hand until the changes slow, then turn on automatic iteration. Have fun. mw... Momentum waves <www.adthermtech.com/wordpress3> 
Re: due correction
Bren On planet Earth, poeple know that the Linux OS and all the projects related to it are free open source codes including maxima (wxmaxima with the gui), you have your reasons to start from scratch, I do not enter here, but please do not tell us that "maxima" is a commercial code, there is even a windows installer. Good Luck to all living on Orion

Re: due correction
I didn't mean to suggest that maxima was a commercial code Ahmed. I appologise for not being clear enough  I need to adapt an existing fortran code to include a nonlinear solver. That is why I need to code the method myself rather than rely on software produced by someone else, whether it be commercial or open source. I thought that my position was clear in my post: "able to code up the method myself" was a strong hint.
Here on Orion it's considered good manners to respond to a polite statement (such as my "Many Thanks" post) with a polite response, being a sarcastic tool is actually considered quite rude here! You should visit some time  though I would advise that you adopt a less hostile attitude. Bren 
Re: Could someone suggest simple (nonlinear) solve
try matlab or maple

All times are GMT 4. The time now is 23:51. 