ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 24 Mar 2015 14:51:40 +0100solving equation involving absolute valueshttps://ask.sagemath.org/question/26295/solving-equation-involving-absolute-values/ Hello
I am newbie to sagemath. I have windows 8 and sage version is 6.4.1. I am running it inside virtualbox.
I was reading some thing about solving equations on sage website at
http://www.sagemath.org/doc/reference/calculus/sage/symbolic/relation.html
At one point author is trying to demonstrate the use of optional keywords for the "solve"
He is solving equation
solve(abs(1-abs(1-x)) == 10, x)
When evaluated this gives
[abs(abs(x - 1) - 1) == 10]
But when the input is modified a little as
solve(abs(1-abs(1-x)) == 10, x, to_poly_solve=True)
sage gives correct result as [x == -10, x == 12]
So why does it not work in the first case ? I didn't understand this use of keyword to_poly_solve.
I tried to post this question on sage-support but for some reason my posted question doesn't seem to appear there.
Please help
sundarTue, 24 Mar 2015 06:13:43 +0100https://ask.sagemath.org/question/26295/solving-equation-involving-absolute-values/Answer by rws for <p>Hello</p>
<p>I am newbie to sagemath. I have windows 8 and sage version is 6.4.1. I am running it inside virtualbox.
I was reading some thing about solving equations on sage website at
<a href="http://www.sagemath.org/doc/reference/calculus/sage/symbolic/relation.html">http://www.sagemath.org/doc/reference...</a></p>
<p>At one point author is trying to demonstrate the use of optional keywords for the "solve"
He is solving equation</p>
<p>solve(abs(1-abs(1-x)) == 10, x)</p>
<p>When evaluated this gives</p>
<p>[abs(abs(x - 1) - 1) == 10]</p>
<p>But when the input is modified a little as</p>
<p>solve(abs(1-abs(1-x)) == 10, x, to_poly_solve=True)</p>
<p>sage gives correct result as [x == -10, x == 12]</p>
<p>So why does it not work in the first case ? I didn't understand this use of keyword to_poly_solve.</p>
<p>I tried to post this question on sage-support but for some reason my posted question doesn't seem to appear there.</p>
<p>Please help
sundar</p>
https://ask.sagemath.org/question/26295/solving-equation-involving-absolute-values/?answer=26297#post-id-26297Sage uses other programs for many of its functionality. In symbolic calculus Sage relies on Maxima for doing integrals, ODEs, limits, equations, simplifications and other things. Equation solving uses Maxima's core but this has limited functionality. Maxima itself in turn makes use of additional packages to augment its abilities.
If you type:
sage: solve??
you see among other things:
- ``to_poly_solve`` - bool (default: False) or string; use
Maxima's ``to_poly_solver`` package to search for more possible
solutions, but possibly encounter approximate solutions.
This keyword is incompatible with ``multiplicities=True``
and is not used when solving inequalities. Setting ``to_poly_solve``
to 'force' (string) omits Maxima's solve command (useful when
some solutions of trigonometric equations are lost).
Tue, 24 Mar 2015 08:08:14 +0100https://ask.sagemath.org/question/26295/solving-equation-involving-absolute-values/?answer=26297#post-id-26297Comment by kcrisman for <p>Sage uses other programs for many of its functionality. In symbolic calculus Sage relies on Maxima for doing integrals, ODEs, limits, equations, simplifications and other things. Equation solving uses Maxima's core but this has limited functionality. Maxima itself in turn makes use of additional packages to augment its abilities.</p>
<p>If you type:</p>
<pre><code>sage: solve??
</code></pre>
<p>you see among other things:</p>
<pre><code>- ``to_poly_solve`` - bool (default: False) or string; use
Maxima's ``to_poly_solver`` package to search for more possible
solutions, but possibly encounter approximate solutions.
This keyword is incompatible with ``multiplicities=True``
and is not used when solving inequalities. Setting ``to_poly_solve``
to 'force' (string) omits Maxima's solve command (useful when
some solutions of trigonometric equations are lost).
</code></pre>
https://ask.sagemath.org/question/26295/solving-equation-involving-absolute-values/?comment=26309#post-id-26309If this answers your question, please do click the "check mark" to accept the answer so that visitors coming to this question know it has been answered :)Tue, 24 Mar 2015 14:51:40 +0100https://ask.sagemath.org/question/26295/solving-equation-involving-absolute-values/?comment=26309#post-id-26309Comment by sundar for <p>Sage uses other programs for many of its functionality. In symbolic calculus Sage relies on Maxima for doing integrals, ODEs, limits, equations, simplifications and other things. Equation solving uses Maxima's core but this has limited functionality. Maxima itself in turn makes use of additional packages to augment its abilities.</p>
<p>If you type:</p>
<pre><code>sage: solve??
</code></pre>
<p>you see among other things:</p>
<pre><code>- ``to_poly_solve`` - bool (default: False) or string; use
Maxima's ``to_poly_solver`` package to search for more possible
solutions, but possibly encounter approximate solutions.
This keyword is incompatible with ``multiplicities=True``
and is not used when solving inequalities. Setting ``to_poly_solve``
to 'force' (string) omits Maxima's solve command (useful when
some solutions of trigonometric equations are lost).
</code></pre>
https://ask.sagemath.org/question/26295/solving-equation-involving-absolute-values/?comment=26298#post-id-26298thanks....Tue, 24 Mar 2015 08:33:46 +0100https://ask.sagemath.org/question/26295/solving-equation-involving-absolute-values/?comment=26298#post-id-26298