ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 23 Nov 2018 11:14:35 -0600newton's method for multiple variables / arbitrary precisionhttp://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/I am trying to find a numerical approximation with arbitrary precision to a real solution to a system of multivariate polynomial equations.
I start out with an approximation which is somewhat close to solving the system, up to an precision of about 1e-05. (Meaning that the equations that I try to evaluate are not zero, but smaller than 1e-05 for my starting value)
In [this question](http://ask.sagemath.org/question/3974/solving-system-of-polynomial-equations-over-reals) is it recommended to use scipy's fmin_tnc method, which is what I did. This works out very nicely and it quickly gave a new solution which now solves my system with precision 1e-07. In the [Scipy doc](http://docs.scipy.org/doc/scipy-0.13.0/reference/generated/scipy.optimize.fmin_tnc.html) it is stated that one can set the "epsilon" parameter, but not smaller than machine precision. So it seems like I can't get much more precision with this method?!
Let's say I want to solve my system with precision 1e-250. My questions are:
1. Can I use the fmin_tnc function to find solutions with higher precision?
2. I there another way in sage to find real solutions to polynomial systems locally (e.g. with the pari/gp)?Tue, 20 May 2014 11:25:59 -0500http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/Comment by mf for <p>I am trying to find a numerical approximation with arbitrary precision to a real solution to a system of multivariate polynomial equations.
I start out with an approximation which is somewhat close to solving the system, up to an precision of about 1e-05. (Meaning that the equations that I try to evaluate are not zero, but smaller than 1e-05 for my starting value)</p>
<p>In <a href="http://ask.sagemath.org/question/3974/solving-system-of-polynomial-equations-over-reals">this question</a> is it recommended to use scipy's fmin_tnc method, which is what I did. This works out very nicely and it quickly gave a new solution which now solves my system with precision 1e-07. In the <a href="http://docs.scipy.org/doc/scipy-0.13.0/reference/generated/scipy.optimize.fmin_tnc.html">Scipy doc</a> it is stated that one can set the "epsilon" parameter, but not smaller than machine precision. So it seems like I can't get much more precision with this method?!</p>
<p>Let's say I want to solve my system with precision 1e-250. My questions are:</p>
<ol>
<li>Can I use the fmin_tnc function to find solutions with higher precision?</li>
<li>I there another way in sage to find real solutions to polynomial systems locally (e.g. with the pari/gp)?</li>
</ol>
http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?comment=23179#post-id-23179@vdelecroix: will do as soon as I have enough karma to do so..Thu, 03 Jul 2014 03:14:08 -0500http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?comment=23179#post-id-23179Comment by vdelecroix for <p>I am trying to find a numerical approximation with arbitrary precision to a real solution to a system of multivariate polynomial equations.
I start out with an approximation which is somewhat close to solving the system, up to an precision of about 1e-05. (Meaning that the equations that I try to evaluate are not zero, but smaller than 1e-05 for my starting value)</p>
<p>In <a href="http://ask.sagemath.org/question/3974/solving-system-of-polynomial-equations-over-reals">this question</a> is it recommended to use scipy's fmin_tnc method, which is what I did. This works out very nicely and it quickly gave a new solution which now solves my system with precision 1e-07. In the <a href="http://docs.scipy.org/doc/scipy-0.13.0/reference/generated/scipy.optimize.fmin_tnc.html">Scipy doc</a> it is stated that one can set the "epsilon" parameter, but not smaller than machine precision. So it seems like I can't get much more precision with this method?!</p>
<p>Let's say I want to solve my system with precision 1e-250. My questions are:</p>
<ol>
<li>Can I use the fmin_tnc function to find solutions with higher precision?</li>
<li>I there another way in sage to find real solutions to polynomial systems locally (e.g. with the pari/gp)?</li>
</ol>
http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?comment=23177#post-id-23177@mf: cool! Could you select your answer (that way your question will be seen as answered in the list).Thu, 03 Jul 2014 03:00:36 -0500http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?comment=23177#post-id-23177Comment by mf for <p>I am trying to find a numerical approximation with arbitrary precision to a real solution to a system of multivariate polynomial equations.
I start out with an approximation which is somewhat close to solving the system, up to an precision of about 1e-05. (Meaning that the equations that I try to evaluate are not zero, but smaller than 1e-05 for my starting value)</p>
<p>In <a href="http://ask.sagemath.org/question/3974/solving-system-of-polynomial-equations-over-reals">this question</a> is it recommended to use scipy's fmin_tnc method, which is what I did. This works out very nicely and it quickly gave a new solution which now solves my system with precision 1e-07. In the <a href="http://docs.scipy.org/doc/scipy-0.13.0/reference/generated/scipy.optimize.fmin_tnc.html">Scipy doc</a> it is stated that one can set the "epsilon" parameter, but not smaller than machine precision. So it seems like I can't get much more precision with this method?!</p>
<p>Let's say I want to solve my system with precision 1e-250. My questions are:</p>
<ol>
<li>Can I use the fmin_tnc function to find solutions with higher precision?</li>
<li>I there another way in sage to find real solutions to polynomial systems locally (e.g. with the pari/gp)?</li>
</ol>
http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?comment=23176#post-id-23176@vdelecroix: I figured out how to do this, see my answer belowThu, 03 Jul 2014 02:07:10 -0500http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?comment=23176#post-id-23176Comment by vdelecroix for <p>I am trying to find a numerical approximation with arbitrary precision to a real solution to a system of multivariate polynomial equations.
I start out with an approximation which is somewhat close to solving the system, up to an precision of about 1e-05. (Meaning that the equations that I try to evaluate are not zero, but smaller than 1e-05 for my starting value)</p>
<p>In <a href="http://ask.sagemath.org/question/3974/solving-system-of-polynomial-equations-over-reals">this question</a> is it recommended to use scipy's fmin_tnc method, which is what I did. This works out very nicely and it quickly gave a new solution which now solves my system with precision 1e-07. In the <a href="http://docs.scipy.org/doc/scipy-0.13.0/reference/generated/scipy.optimize.fmin_tnc.html">Scipy doc</a> it is stated that one can set the "epsilon" parameter, but not smaller than machine precision. So it seems like I can't get much more precision with this method?!</p>
<p>Let's say I want to solve my system with precision 1e-250. My questions are:</p>
<ol>
<li>Can I use the fmin_tnc function to find solutions with higher precision?</li>
<li>I there another way in sage to find real solutions to polynomial systems locally (e.g. with the pari/gp)?</li>
</ol>
http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?comment=23109#post-id-23109Could you provide the system? I do not know whether pari/gp can help, but it is not hard to setup a Newton method. From what I saw the method fmin_trunc looks much more powerful than what you need.Sun, 29 Jun 2014 05:26:32 -0500http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?comment=23109#post-id-23109Answer by mf for <p>I am trying to find a numerical approximation with arbitrary precision to a real solution to a system of multivariate polynomial equations.
I start out with an approximation which is somewhat close to solving the system, up to an precision of about 1e-05. (Meaning that the equations that I try to evaluate are not zero, but smaller than 1e-05 for my starting value)</p>
<p>In <a href="http://ask.sagemath.org/question/3974/solving-system-of-polynomial-equations-over-reals">this question</a> is it recommended to use scipy's fmin_tnc method, which is what I did. This works out very nicely and it quickly gave a new solution which now solves my system with precision 1e-07. In the <a href="http://docs.scipy.org/doc/scipy-0.13.0/reference/generated/scipy.optimize.fmin_tnc.html">Scipy doc</a> it is stated that one can set the "epsilon" parameter, but not smaller than machine precision. So it seems like I can't get much more precision with this method?!</p>
<p>Let's say I want to solve my system with precision 1e-250. My questions are:</p>
<ol>
<li>Can I use the fmin_tnc function to find solutions with higher precision?</li>
<li>I there another way in sage to find real solutions to polynomial systems locally (e.g. with the pari/gp)?</li>
</ol>
http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?answer=23175#post-id-23175One easy way to this is to use [mpmath.findroot](https://mpmath.googlecode.com/svn/trunk/doc/build/calculus/optimization.html)!Thu, 03 Jul 2014 02:06:39 -0500http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?answer=23175#post-id-23175Comment by slelievre for <p>One easy way to this is to use <a href="https://mpmath.googlecode.com/svn/trunk/doc/build/calculus/optimization.html">mpmath.findroot</a>!</p>
http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?comment=44394#post-id-44394The documentation page is now at [http://mpmath.org/doc/current/calculus/optimization.html](http://mpmath.org/doc/current/calculus/optimization.html).Fri, 23 Nov 2018 11:14:35 -0600http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?comment=44394#post-id-44394Comment by calc314 for <p>One easy way to this is to use <a href="https://mpmath.googlecode.com/svn/trunk/doc/build/calculus/optimization.html">mpmath.findroot</a>!</p>
http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?comment=23183#post-id-23183Nice! I've added a link to the documentation.Thu, 03 Jul 2014 07:22:08 -0500http://ask.sagemath.org/question/11367/newtons-method-for-multiple-variables-arbitrary-precision/?comment=23183#post-id-23183