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, 26 Dec 2013 14:40:45 -0600simplify roots with mulitple inbedded rootshttp://ask.sagemath.org/question/10840/simplify-roots-with-mulitple-inbedded-roots/Hi everyone,
I know this questions has been asked quite some times before and I've browsed a couple of hours searching for the answer but I haven't found anything that worked yet. So here it is:
![](http://i40.tinypic.com/33awkzm.png)
So I have these two functions and I need to calculate k. I've found you can use the maxima_methods, but as you can see, it doesn't work here either. (I tested the example question and I could simplify that one with these commands, so it's not the virtual machine)
I know you can calculate it by using the maxima engine itself on the virtual machine en then you should find 37/4+3*sqrt(7). But isn't there any method a bit less far-fetched, and I also still need to find a way to switch to maxima on the cloud, so this solution is for the virtual machine only...
I'm working on a project for school concerning Sage and so far this is the only problem I've encountered.
Thanks in advance!Sun, 22 Dec 2013 23:45:40 -0600http://ask.sagemath.org/question/10840/simplify-roots-with-mulitple-inbedded-roots/Comment by kcrisman for <p>Hi everyone,</p>
<p>I know this questions has been asked quite some times before and I've browsed a couple of hours searching for the answer but I haven't found anything that worked yet. So here it is:
<img alt="" src="http://i40.tinypic.com/33awkzm.png"/></p>
<p>So I have these two functions and I need to calculate k. I've found you can use the maxima_methods, but as you can see, it doesn't work here either. (I tested the example question and I could simplify that one with these commands, so it's not the virtual machine)</p>
<p>I know you can calculate it by using the maxima engine itself on the virtual machine en then you should find 37/4+3*sqrt(7). But isn't there any method a bit less far-fetched, and I also still need to find a way to switch to maxima on the cloud, so this solution is for the virtual machine only...</p>
<p>I'm working on a project for school concerning Sage and so far this is the only problem I've encountered.</p>
<p>Thanks in advance!</p>
http://ask.sagemath.org/question/10840/simplify-roots-with-mulitple-inbedded-roots/?comment=16499#post-id-16499These kinds of questions are sort of tricky... look up Bombelli's experiments with the cubic formula to see more non-obvious examples!Thu, 26 Dec 2013 14:40:45 -0600http://ask.sagemath.org/question/10840/simplify-roots-with-mulitple-inbedded-roots/?comment=16499#post-id-16499Answer by tmonteil for <p>Hi everyone,</p>
<p>I know this questions has been asked quite some times before and I've browsed a couple of hours searching for the answer but I haven't found anything that worked yet. So here it is:
<img alt="" src="http://i40.tinypic.com/33awkzm.png"/></p>
<p>So I have these two functions and I need to calculate k. I've found you can use the maxima_methods, but as you can see, it doesn't work here either. (I tested the example question and I could simplify that one with these commands, so it's not the virtual machine)</p>
<p>I know you can calculate it by using the maxima engine itself on the virtual machine en then you should find 37/4+3*sqrt(7). But isn't there any method a bit less far-fetched, and I also still need to find a way to switch to maxima on the cloud, so this solution is for the virtual machine only...</p>
<p>I'm working on a project for school concerning Sage and so far this is the only problem I've encountered.</p>
<p>Thanks in advance!</p>
http://ask.sagemath.org/question/10840/simplify-roots-with-mulitple-inbedded-roots/?answer=15836#post-id-15836Quick and dirty fix, look at the algebraic field:
sage: b = QQbar(k)
sage: b.as_number_field_element()
(Number Field in a with defining polynomial y^2 - 7,
3*a + 37/4,
Ring morphism:
From: Number Field in a with defining polynomial y^2 - 7
To: Algebraic Real Field
Defn: a |--> 2.645751311064591?)
Here, `b` is `3*a + 37/4`, and `a` is the root of `y^2 - 7` which is close to `2.645751311064591`, so there should be a way to get your formula from this automatically from Sage.
Also, you can do things like:
sage: b.minpoly()
x^2 - 37/2*x + 361/16
Mon, 23 Dec 2013 00:04:13 -0600http://ask.sagemath.org/question/10840/simplify-roots-with-mulitple-inbedded-roots/?answer=15836#post-id-15836Comment by Kuroth for <p>Quick and dirty fix, look at the algebraic field:</p>
<pre><code>sage: b = QQbar(k)
sage: b.as_number_field_element()
(Number Field in a with defining polynomial y^2 - 7,
3*a + 37/4,
Ring morphism:
From: Number Field in a with defining polynomial y^2 - 7
To: Algebraic Real Field
Defn: a |--> 2.645751311064591?)
</code></pre>
<p>Here, <code>b</code> is <code>3*a + 37/4</code>, and <code>a</code> is the root of <code>y^2 - 7</code> which is close to <code>2.645751311064591</code>, so there should be a way to get your formula from this automatically from Sage.</p>
<p>Also, you can do things like:</p>
<pre><code>sage: b.minpoly()
x^2 - 37/2*x + 361/16
</code></pre>
http://ask.sagemath.org/question/10840/simplify-roots-with-mulitple-inbedded-roots/?comment=16505#post-id-16505hmm thanks! Sage astonishes me more and more heheMon, 23 Dec 2013 01:25:25 -0600http://ask.sagemath.org/question/10840/simplify-roots-with-mulitple-inbedded-roots/?comment=16505#post-id-16505