Post Reply 
[CAES] (x^4-4*x^3+2*x^2+4*x+4) Exact factorization of Quartic Polynomial
04-24-2016, 12:16 AM (This post was last modified: 04-24-2016 02:10 PM by compsystems.)
Post: #1
[CAES] (x^4-4*x^3+2*x^2+4*x+4) Exact factorization of Quartic Polynomial
Hello

QUARTIC equation A.K.A BIQUADRATICT info.
http://www.wolframalpha.com/input/?i=quartic+equation


The ti68k CAES (COMPUTER ALGEBRA EXPERT SYSTEM) calculators, factored with approximate values & only 2 factors =( =^[

cfactor (x^4-4*x^3+2*x^2+4*x+4,x) [ENTER]->
( x^2+5.0482+6.69395*x ) * ( x^2+1.0482*x+0.59755 )

wolfram if factored with exact values AND 4 FACTORS =) =]

https://www.wolframalpha.com/input/?i=fa...2B4*x%2B4) [ENTER]->

(1+sqrt(2-i *sqrt(3))-X) * (1+sqrt(2+i *sqrt(3))-X) * (-1+sqrt(2-i *sqrt(3))+X) * (-1+sqrt(2+i *sqrt(3))+X)



[REQUEST] Please add the solution of the 4th grade polynomial equation by formula
Find all posts by this user
Quote this message in a reply
04-24-2016, 12:49 AM
Post: #2
RE: [CAES] factor (x^4-4*x^3+2*x^2+4*x+4)
with exact mode turned off cfactor(x^4-4*x^3+2*x^2+4*x+4) returns:

(x-2.52409830901+0.568221484575*i)*(x-2.52409830901-0.568221484575*i)*(x+0.524098309012+0.568221484575*i)*(x+0.524098309012-0.568221484575*i)

with exact mode turned on it returns:

x^4-4*x^3+2*x^2+4*x+4

that's with version 8151

-road
Find all posts by this user
Quote this message in a reply
04-24-2016, 02:51 AM (This post was last modified: 04-24-2016 02:08 PM by compsystems.)
Post: #3
Re:
factor (x^4-4*x^3+2*x^2+4*x+4,x) [ENTER] ->
(x-2.52409830901+0.568221484575*i)*(x-2.52409830901-0.568221484575*i)*(x+0.524098309012+0.568221484575*i)*(x+0.524098309012-0.568221484575*i)

that answer is by a numerical method, for exact has to be made by formula.

It is a challenge for BERNARD, include that in the next version xcas
Find all posts by this user
Quote this message in a reply
04-24-2016, 06:07 AM
Post: #4
RE: [CAES] (x^4-4*x^3+2*x^2+4*x+4) Quartic Factor exactly
As already explained many times, solving 4th order equations with Ferrari formulae is not useful for exact and for numeric computations. You can of course write your own program to do it if you disagree with me:-)
Find all posts by this user
Quote this message in a reply
04-24-2016, 11:15 AM
Post: #5
RE: [CAES] (x^4-4*x^3+2*x^2+4*x+4) Quartic Factor exactly
I agree that exact solutions to 4 order equations have little value. However, I expected cfactor to switch to approximate mode automatically and give a warning when appropriate, such as csolve does; not just return the original equation unaltered. Example: when exact mode is checked, csolve((x^4-4*x^3+2*x^2+4*x+4) = 0,x) gives a warning, then supplies the approximate answer.

-paul
Find all posts by this user
Quote this message in a reply
04-24-2016, 12:34 PM (This post was last modified: 04-24-2016 02:18 PM by compsystems.)
Post: #6
RE:
Google Translator =^[

I also be agree, when the EXACT mode is fixed and internally the CAES has not algorithm to calculate exactly, should display a numerical solution. It is uncomfortable to be changing flags manually, much even would know and think that it can at least throw the approximate response

HPPRIME

cfactor(x^4-4*x^3+2*x^2+4*x+4) & EXACT MODE ON [ENTER]->
x^4-4*x^3+2*x^2+4*x+4 =( ALGORITHM INTERNAL NOT DEFINED YET


cfactor(x^4-4*x^3+2*x^2+4*x+4) & EXACT MODE OFF (APPROX CALCULATION)[ENTER]->
(x-2.52409830...+0.568221484...*i)*(x-2.52409830...-0.568221484...*i)*(x+0.524098309...+0.568221484...*i)*(x+0.524098309...-0.568221484...*i)

or one QPIROOT exact algorithm is required
exact(ANS)
(x+(-740017*(i)/1302339)-(1185781/469784))*(x+(-740017*(i)/1302339)+(490784/936435))*(x+(740017*(i)/1302339)-(1185781/469784))*(x+(740017*(i)/1302339)+(490784/936435))
=(


(1+sqrt(2-i *sqrt(3))-X) * (1+sqrt(2+i *sqrt(3))-X) * (-1+sqrt(2-i *sqrt(3))+X) * (-1+sqrt(2+i *sqrt(3))+X)
the most important answers are real and exact, there is no loss of information.

Numerical answers are acceptable when there is not human power or algorithm to calculate.

on the internet there are formulas to calculate exactly one factorization of a quartic, that should be BUILT-IN in the CAES as it does WOLFRAM
Find all posts by this user
Quote this message in a reply
04-24-2016, 07:10 PM
Post: #7
RE: [CAES] (x^4-4*x^3+2*x^2+4*x+4) Exact factorization of Quartic Polynomial
(04-24-2016 11:15 AM)roadrunner Wrote:  I agree that exact solutions to 4 order equations have little value. However, I expected cfactor to switch to approximate mode automatically and give a warning when appropriate, such as csolve does; not just return the original equation unaltered. Example: when exact mode is checked, csolve((x^4-4*x^3+2*x^2+4*x+4) = 0,x) gives a warning, then supplies the approximate answer.

-paul
cfactor factors over the field of coefficients of the argument, it should not switch to approx mode like csolve because cfactor is a rewriting command (unlike csolve), the answer must be mathematically equivalent to the argument.

-> to compsystems:
I won't elaborate again on quartic equations, please read my explanations in some post on a similar topic here. Again, you can write yourself a user program to factor 4th order polynomials if you think it's that important.
Find all posts by this user
Quote this message in a reply
04-24-2016, 09:17 PM
Post: #8
RE: [CAES] (x^4-4*x^3+2*x^2+4*x+4) Exact factorization of Quartic Polynomial
Of course we can be programmed. but ideally this embedded in the firmware, all the algebra is important, but was invented, also if we try to compete with WOLFRAM, we must support all possible functions in exact mode.
Find all posts by this user
Quote this message in a reply
04-25-2016, 06:53 AM
Post: #9
RE: [CAES] (x^4-4*x^3+2*x^2+4*x+4) Exact factorization of Quartic Polynomial
If you want to compare with wolfram, you should not use a calc.
Embedded square roots is not the best way to represent exactly roots of polynomials. One way to factor your polynomial with Xcas is
Code:

p:=x^4-4*x^3+2*x^2+4*x+4;
rootof(p):='j';
evalf(j);
factor(p,j);
This gives more information on the structures of the exact roots.
Find all posts by this user
Quote this message in a reply
04-25-2016, 03:45 PM (This post was last modified: 04-25-2016 05:13 PM by Anders.)
Post: #10
RE: [CAES] (x^4-4*x^3+2*x^2+4*x+4) Exact factorization of Quartic Polynomial
To factorize generally ALL QUARTIC polynomial exactly you would need to solve the roots exactly by for instance using the formula posted on Wiki here:
https://upload.wikimedia.org/wikipedia/c...ormula.svg

Then Prime need to simplify/reduce until the roots cannot be simplified any more and lastly put it back in a factorized form. To implement this internal simplification of this large formula (for the general case) in CAS would likely be very challenging and likely also be very resource intensive and time consuming when executed. For wolfram running in the cloud using many magnitudes more CPU and memory it does not matter. However, not even Wolfram resolves generally for all polynomials (just some special classes of polynomials). So in the trade off when choosing what to implement on a constrained handheld platform, competing with other function candidates for the same flash memory space, CPU time (and man hour implementation time), general exact QUARTIC polynomial factorization would be difficult to justify.

But, for the sake of argument, let's say we discover and implement some low resource efficient great simplification algorithm. Just look at the exact general formula, using the link above. Imagine if you have a polynomial with some poorly correlated factors a, b, c, d, e, (not hard to construct - just make sure the inner roots do not come out nicely), resulting in some really complicated irreducible roots, and what this formula would look like - it would be totally incomprehensible for humans and totally useless in practical work.

(For the special cases when you have rational roots the factor() function works, but it is a very special case. You can implement many simple special cases that can be made to produce simpler outputs but they are not general.)
Find all posts by this user
Quote this message in a reply
04-25-2016, 07:17 PM
Post: #11
RE: [CAES] (x^4-4*x^3+2*x^2+4*x+4) Exact factorization of Quartic Polynomial
I do not understand the desire to algebraically factor quartics into linear factors especially if the linear factors do not provide any direct insight to quartic itself. At least for quadratics, the linear factors \( (x-a)(x-b) \) one can quickly compute \( -( a+b) \) to get the linear coefficient and \( ab \) gives the constant term. Of course, this can be generalized, but it is not quite as simple for higher order polynomials. I would even put cubics into this category of "neat but not really useful" insofar as algebraic roots are concerned -- not useful for pedagogy nor everyday use.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
04-30-2016, 08:40 PM (This post was last modified: 04-30-2016 08:41 PM by compsystems.)
Post: #12
RE: [CAES] (x^4-4*x^3+2*x^2+4*x+4) Exact factorization of Quartic Polynomial
symbolic solution


https://www.wolframalpha.com/input/?i=so...2B+e+%3D+0
Find all posts by this user
Quote this message in a reply
05-01-2016, 05:10 PM
Post: #13
RE: [CAES] (x^4-4*x^3+2*x^2+4*x+4) Exact factorization of Quartic Polynomial
(04-30-2016 08:40 PM)compsystems Wrote:  symbolic solution


https://www.wolframalpha.com/input/?i=so...2B+e+%3D+0

I think you have just conclusively demonstrated exactly why this is not implemented, and validated what everyone else in this thread is saying.

Here is *one* of your roots. There are four more.

Quote:(x == -b/(4 a) - Sqrt[b^2/(4 a^2) - (2 c)/(3 a) + (2^(1/3) (c^2 - 3 b d + 12 a e))/(3 a (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)) + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)/(3 2^(1/3) a)]/2 - Sqrt[b^2/(2 a^2) - (4 c)/(3 a) - (2^(1/3) (c^2 - 3 b d + 12 a e))/(3 a (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)) - (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)/(3 2^(1/3) a) - (-(b^3/a^3) + (4 b c)/a^2 - (8 d)/a)/(4 Sqrt[b^2/(4 a^2) - (2 c)/(3 a) + (2^(1/3) (c^2 - 3 b d + 12 a e))/(3 a (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)) + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)/(3 2^(1/3) a)])]/2 && a != 0) || (x == -b/(4 a) - Sqrt[b^2/(4 a^2) - (2 c)/(3 a) + (2^(1/3) (c^2 - 3 b d + 12 a e))/(3 a (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)) + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)/(3 2^(1/3) a)]/2 + Sqrt[b^2/(2 a^2) - (4 c)/(3 a) - (2^(1/3) (c^2 - 3 b d + 12 a e))/(3 a (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)) - (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)/(3 2^(1/3) a) - (-(b^3/a^3) + (4 b c)/a^2 - (8 d)/a)/(4 Sqrt[b^2/(4 a^2) - (2 c)/(3 a) + (2^(1/3) (c^2 - 3 b d + 12 a e))/(3 a (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)) + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)/(3 2^(1/3) a)])]/2 && a != 0) || (x == -b/(4 a) + Sqrt[b^2/(4 a^2) - (2 c)/(3 a) + (2^(1/3) (c^2 - 3 b d + 12 a e))/(3 a (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)) + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)/(3 2^(1/3) a)]/2 - Sqrt[b^2/(2 a^2) - (4 c)/(3 a) - (2^(1/3) (c^2 - 3 b d + 12 a e))/(3 a (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)) - (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)/(3 2^(1/3) a) + (-(b^3/a^3) + (4 b c)/a^2 - (8 d)/a)/(4 Sqrt[b^2/(4 a^2) - (2 c)/(3 a) + (2^(1/3) (c^2 - 3 b d + 12 a e))/(3 a (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)) + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)/(3 2^(1/3) a)])]/2 && a != 0) || (x == -b/(4 a) + Sqrt[b^2/(4 a^2) - (2 c)/(3 a) + (2^(1/3) (c^2 - 3 b d + 12 a e))/(3 a (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)) + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)/(3 2^(1/3) a)]/2 + Sqrt[b^2/(2 a^2) - (4 c)/(3 a) - (2^(1/3) (c^2 - 3 b d + 12 a e))/(3 a (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)) - (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e)^2])^(1/3)/(3 2^(1/3) a) + (-(b^3/a^3) + (4 b c)/a^2 - (8 d)/a)/(4 Sqrt[b^2/(4 a^2) - (2 c)/(3 a) + (2^(1/3) (c^2 - 3 b d + 12 a e))/(3 a (2 c^3 - 9 b c d + 27 a d^2 + 27 b^2 e - 72 a c e + Sqrt[-4 (c^2 - 3 b d + 12 a e)^3 + (2 c^3 - 9 b c d + 27 a

In what way would this ever be useful, or even usable, on a calculator? There are better methods for getting roots once you move beyond basic polynomials.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
Post Reply 




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