[SciPy-user] RE: root finding

Howey, David A d.howey at imperial.ac.uk
Tue Aug 9 06:38:49 EDT 2005


oops, should have checked out the documentation, there is something called 'newton' in the optimize package. Still, I would appreciate any tips for use.

________________________________

From: scipy-user-bounces at scipy.net on behalf of Howey, David A
Sent: Tue 09/08/2005 11:32
To: SciPy Users List
Subject: root finding


Hi,
 
I am pondering the best way to do some root finding. I have a function which I give a mass flow value to and it returns a pressure. I need to iterate the mass flow value until a specific pressure is reached. As long as sensible initial guess are chosen, the function produces a pretty smooth curve with a unique root.
 
Initially I had a rough and ready algorithm which shoved a range of mass flows (in an array) through the function and looked for a zero crossing, and then fine tuned the result a few times. This works, but I'm wondering whether something like Newton-Raphson would be better, although I don't directly know the derivative, so I would be using a numerical approximation (I think this is called the secant method). Does scipy have an implementation of this? Any tips for use?
 
Thanks
 
Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 4077 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20050809/987dfb87/attachment.bin>


More information about the SciPy-User mailing list