Exact 3rd degree poly root
02-26-2016, 05:40 AM
Post: #1
 lrdheat Senior Member Posts: 607 Joined: Feb 2014
Exact 3rd degree poly root
Is there a way to get an exact instead of decimal root to a 3rd degree polynomial such as
X^3 - (21\4)*x^2 + 9*x - 4 ?

My Classpad 400 can accomplish this. How do I do so on the Prime?
02-26-2016, 10:00 AM
Post: #2
 parisse Senior Member Posts: 1,163 Joined: Dec 2013
RE: Exact 3rd degree poly root
You must make a program if you want a solution expressed in terms of radicals. You can inspire yourself from the following Xcas program:
Code:
 cardan(P,x):={   local b,p,q,d,V,u,v,x1,x2,x3,n,j;   j:=exp(2*i*pi/3);   V:=symb2poly(P,x);   n:=size(V);   if (n!=4){     throw(afficher(P)+" n'est pas de degre 3");   }   // Reduction de l'equation   V:=V/V;   b:=V;   V:=ptayl(V,-b/3);   p:=V;   q:=V;   // on est ramen￩ ￠ x^3+p*x+q=0   // x=u+v -> u^3+v^3+(3uv+p)(u+v)+q=0   // On pose uv=-p/3 donc u^3+v^3=-q et u^3 et v^3 sont solutions   // de u^3 v^3 = -p^3/27 et u^3+v^3=-q   // donc de x^2+q*x-p^3/27=0   d:=q^2/4+p^3/27;   if (d==0){     // racine double     return solve(P,x);    }   d:=sqrt(d);   u:=(-q/2+d)^(1/3);   v:=-p/3/u;   x1:=u+v-b/3;   x2:=u*j+v*conj(j)-b/3;   x3:=u*conj(j)+v*j-b/3;   return [x1,x2,x3]; }:;
This is not done automatically, because further handling nested 3rd/square roots would be too complicated. In fact, Cardan (and Ferrari formulae) are useless: too complicated for symbolic handling, not accurate enough for numeric, unfortunately many math teachers do not know that. The right way to handle symbolically exact solutions of polynomials is algebraic extensions of Q, Xcas will return a "rootof" solution for this polynomial. But rootofs have been disabled on the Prime, perhaps because it is a little more complicated to explain them to highschool students.
02-26-2016, 03:38 PM (This post was last modified: 02-26-2016 03:45 PM by rhab.)
Post: #3
 rhab Junior Member Posts: 2 Joined: Jul 2015
RE: Exact 3rd degree poly root
Maxima can do that by default:

solve(x^3 - (21/4)*x^2 + 9*x - 4=0, x);

You can try it on-line with http://maxima-online.org/#?in=solve(x%5E...B%0A%20%09

BTW, you can install maxima on your phone!
02-26-2016, 07:45 PM
Post: #4
 parisse Senior Member Posts: 1,163 Joined: Dec 2013
RE: Exact 3rd degree poly root
Yes, but I think you did not understand what I wrote. It's nice to impress your friends with the root expressions with nested radicals, but after that you won't be able to simplify expressions easily. For example, it will probably be costly to find the value of the product of the three roots.
And by the way, there is an experimental version of Xcas that runs on your phone or tablet or any browser (Firefox recommended) Xcas online offline. Once downloaded, all computations are done on your phone, tablet or PC, you don't need an Internet connection anymore.
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)