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.Thu, 11 Feb 2016 15:00:36 -0600How to solve polynomial equation systemhttp://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/ Greetings,
I'm pretty new to Sage and excited in discovering new functions and ways to solve certain problems. Previously I've been massively working with sympy for solving equation systems. However I wanted to try out Sage.
Currently I'm facing a polynomial equation system (3x3 with three unknown variables a,b,d) where the polynom is of degree 2. However the equations include also trigonometric elements such as cos(a), sin(b) etc.
How can polynomial equations with trigonometric elements be solved in sage? (under the condition that the specific equation system is solvable at all). Is there a specific solver which is recommended to use for such type of equations?
Thank you in advance for any hints and
with best regards
DanTue, 09 Feb 2016 02:08:24 -0600http://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/Comment by kcrisman for <p>Greetings,</p>
<p>I'm pretty new to Sage and excited in discovering new functions and ways to solve certain problems. Previously I've been massively working with sympy for solving equation systems. However I wanted to try out Sage.</p>
<p>Currently I'm facing a polynomial equation system (3x3 with three unknown variables a,b,d) where the polynom is of degree 2. However the equations include also trigonometric elements such as cos(a), sin(b) etc. </p>
<p>How can polynomial equations with trigonometric elements be solved in sage? (under the condition that the specific equation system is solvable at all). Is there a specific solver which is recommended to use for such type of equations?</p>
<p>Thank you in advance for any hints and
with best regards</p>
<p>Dan</p>
http://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/?comment=32544#post-id-32544Haha, that would be a good theorem! I think that usually checking whether something is computationally hard is computationally hard, for some value of the phrase "computationally hard"...Thu, 11 Feb 2016 15:00:36 -0600http://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/?comment=32544#post-id-32544Comment by Dan for <p>Greetings,</p>
<p>I'm pretty new to Sage and excited in discovering new functions and ways to solve certain problems. Previously I've been massively working with sympy for solving equation systems. However I wanted to try out Sage.</p>
<p>Currently I'm facing a polynomial equation system (3x3 with three unknown variables a,b,d) where the polynom is of degree 2. However the equations include also trigonometric elements such as cos(a), sin(b) etc. </p>
<p>How can polynomial equations with trigonometric elements be solved in sage? (under the condition that the specific equation system is solvable at all). Is there a specific solver which is recommended to use for such type of equations?</p>
<p>Thank you in advance for any hints and
with best regards</p>
<p>Dan</p>
http://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/?comment=32536#post-id-32536Is there a specific way to check if they are computationally hard?Thu, 11 Feb 2016 12:21:36 -0600http://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/?comment=32536#post-id-32536Comment by Dan for <p>Greetings,</p>
<p>I'm pretty new to Sage and excited in discovering new functions and ways to solve certain problems. Previously I've been massively working with sympy for solving equation systems. However I wanted to try out Sage.</p>
<p>Currently I'm facing a polynomial equation system (3x3 with three unknown variables a,b,d) where the polynom is of degree 2. However the equations include also trigonometric elements such as cos(a), sin(b) etc. </p>
<p>How can polynomial equations with trigonometric elements be solved in sage? (under the condition that the specific equation system is solvable at all). Is there a specific solver which is recommended to use for such type of equations?</p>
<p>Thank you in advance for any hints and
with best regards</p>
<p>Dan</p>
http://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/?comment=32519#post-id-32519@kcrisman: thank you for your hint on to_poly_solve=True :)
@tmonteil: certainly!
var('delta alpha_orig alpha_v')
par1 = (delta*sin(alpha_orig) + 0)**2*sin(alpha_v)/cos(alpha_v)**2 == delta*cos(alpha_orig) + 0
par2 = (delta*sin(alpha_orig) + 2)**2*sin(alpha_v)/cos(alpha_v)**2 == delta*cos(alpha_orig) + 4
par3 = (delta*sin(alpha_orig) - 2)**2*sin(alpha_v)/cos(alpha_v)**2 == delta*cos(alpha_orig) + 4
solve([par1,par2,par3],delta, alpha_v, alpha_orig, to_poly_solve='force')
for x and y any points can be inserted. So I thought of setting up a 3x3 equation system and trying to solve a,b and d.
However doing this with plain 'solve' makes sage to run for a very long time (actually it stopped only when it ran out of memory).
Thank you in advance for any hints and with best regards
DanWed, 10 Feb 2016 03:48:32 -0600http://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/?comment=32519#post-id-32519Comment by kcrisman for <p>Greetings,</p>
<p>I'm pretty new to Sage and excited in discovering new functions and ways to solve certain problems. Previously I've been massively working with sympy for solving equation systems. However I wanted to try out Sage.</p>
<p>Currently I'm facing a polynomial equation system (3x3 with three unknown variables a,b,d) where the polynom is of degree 2. However the equations include also trigonometric elements such as cos(a), sin(b) etc. </p>
<p>How can polynomial equations with trigonometric elements be solved in sage? (under the condition that the specific equation system is solvable at all). Is there a specific solver which is recommended to use for such type of equations?</p>
<p>Thank you in advance for any hints and
with best regards</p>
<p>Dan</p>
http://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/?comment=32530#post-id-32530Some of these are probably arbitrarily (computationally) hard, keep in mind.Thu, 11 Feb 2016 09:36:58 -0600http://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/?comment=32530#post-id-32530Comment by tmonteil for <p>Greetings,</p>
<p>I'm pretty new to Sage and excited in discovering new functions and ways to solve certain problems. Previously I've been massively working with sympy for solving equation systems. However I wanted to try out Sage.</p>
<p>Currently I'm facing a polynomial equation system (3x3 with three unknown variables a,b,d) where the polynom is of degree 2. However the equations include also trigonometric elements such as cos(a), sin(b) etc. </p>
<p>How can polynomial equations with trigonometric elements be solved in sage? (under the condition that the specific equation system is solvable at all). Is there a specific solver which is recommended to use for such type of equations?</p>
<p>Thank you in advance for any hints and
with best regards</p>
<p>Dan</p>
http://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/?comment=32516#post-id-32516Could you please give us a concrete example ? Sage symbolic capabilities are not uniform, so it really depends on the kind of expressions.Tue, 09 Feb 2016 16:18:38 -0600http://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/?comment=32516#post-id-32516Comment by kcrisman for <p>Greetings,</p>
<p>I'm pretty new to Sage and excited in discovering new functions and ways to solve certain problems. Previously I've been massively working with sympy for solving equation systems. However I wanted to try out Sage.</p>
<p>Currently I'm facing a polynomial equation system (3x3 with three unknown variables a,b,d) where the polynom is of degree 2. However the equations include also trigonometric elements such as cos(a), sin(b) etc. </p>
<p>How can polynomial equations with trigonometric elements be solved in sage? (under the condition that the specific equation system is solvable at all). Is there a specific solver which is recommended to use for such type of equations?</p>
<p>Thank you in advance for any hints and
with best regards</p>
<p>Dan</p>
http://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/?comment=32509#post-id-32509You may want to use the `to_poly_solve=True` option for `solve()`, which uses Maxima under the hood.Tue, 09 Feb 2016 11:05:01 -0600http://ask.sagemath.org/question/32506/how-to-solve-polynomial-equation-system/?comment=32509#post-id-32509