[SciPy-User] SciPy-User Digest, Vol 110, Issue 46

The Helmbolds helmrp@yahoo....
Sat Oct 27 12:17:22 CDT 2012


In response to:

> Date: Fri, 26 Oct 2012 16:53:47 -0400

> From: "Moore, Eric (NIH/NIDDK) [F]" <eric.moore2@nih.gov>
> Subject: Re: [SciPy-User] Request help with fsolve outputs
>>  -----Original Message-----
>>  From: The Helmbolds [mailto:helmrp@yahoo.com]
>>  Sent: Friday, October 26, 2012 11:52 AM
>>  To: User SciPy
>>  Subject: [SciPy-User] Request help with fsolve outputs
>> 
>>   ----SNIP----
>>
>>  So please help me out here. What are the fjac and r values that fsolve
>>  returns (where fjac and r are suppose to be the QR factors for the final 
>>Jacobian) ?
>>  How are they related to the above Qend, Rend, and Jend (i.e., the apparently
>> correct values from an independent computation)?
>>  How is the user supposed to use them (i.e., the fjac and r values returned by 
>> fsolve)?
>>  Bob H
>> 
> Eric Moore responded:
>
> I haven't spent any time playing with your example, but I have looked at a 
> simpler example.  It seems that the approximated jacobian can be quite far off 
> and fsolve can still return correct zeros.  How good the approximation ends up 
> being depends on your choice of initial conditions.  I've attached a trivial 
> example that shows this.
> 
> There is also the epsfcn parameter, but based on the minpack documentation, the 
> default should be okay for both our examples since we have full machine 
> precision available in our functions to minimize. 
> 
> It would make things much easier for other people if you could post a python 
> file where you have defined your function and are calling fsolve.  I believe 
> Ralph asked if you could do this the last time you posted this question.  
> I'm sorry that no one has come in with a simple answer, but this would still 
> be a good step to make considering your question a little easier for other 
> people.
> 
> Good luck, 
> 
> Eric


Eric, thanks for your comments. I gather from them that the descriptive write-up 
might be improved if it included a statement more or less as follows:

If the user's application requires accurate values of the problem's Jacobian and its QR 
decomposition values evaluated at fsolve's 'root' value, they should not  rely on the values 
for those quantities returned by fsolve, unless confirmed by an independent computation.

Bob H


More information about the SciPy-User mailing list