Student Support Forum: 'Polynomial factorization by roots?' topicStudent Support Forum > General > "Polynomial factorization by roots?"

 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic
 Author Comment/Response yehuda 12/28/12 11:39am In Response To 'Re: Re: Polynomial factorization by roots?'---------If Solve can find the roots of the polynomial you can use it without guessing that you need Extension->I for your specific example p = x^4 + 2 x^2 + 1; Times @@ Subtract @@@ Flatten@Solve[p == 0, x] returns what you need now slower Solve[p == 0, x] returns {{x -> -I}, {x -> -I}, {x -> I}, {x -> I}} To omit the internal lists you use Flatten Flatten[Solve[p == 0, x]] (or Flatten@Solve[p==0,x]) Then you replace the x->I etc to x-I etc using Apply at level 1 with the shortcut of @@@ Subtract @@@ Flatten@Solve[p == 0, x] returns {I + x, I + x, -I + x, -I + x} Now replace the outermost head which is a list with Times for multiplication This is again Apply but at level 0 (replacing the outermost head) using the shortcut @@ Without the shorthand notation this would be Apply[Times, Apply[Subtract, Flatten[Solve[p == 0, x]], 1]] HTH yehuda URL: ,

 Subject (listing for 'Polynomial factorization by roots?') Author Date Posted Polynomial factorization by roots? Gandalf Saxe 12/11/12 11:08am Re: Polynomial factorization by roots? Nasser M. Ab... 12/12/12 08:07am Re: Polynomial factorization by roots? Gandalf 12/18/12 08:58am Re: Polynomial factorization by roots? Steve Keeley 12/25/12 7:44pm Re: Re: Polynomial factorization by roots? Steve Keeley 12/26/12 7:30pm Re: Polynomial factorization by roots? Steve Keeley 12/26/12 7:48pm Re: Re: Polynomial factorization by roots? Gandalf Saxe 12/28/12 05:36am Re: Re: Re: Polynomial factorization by roots? yehuda 12/28/12 11:39am Re: Re: Re: Polynomial factorization by roots? Steve Keeley 12/28/12 12:11pm Re: Re: Re: Polynomial factorization by roots? Steve Keeley 12/28/12 1:02pm Re: Re: Re: Re: Polynomial factorization by roo... yehuda 12/29/12 00:17am
 < Previous Comment | Next Comment > Help | Reply To Comment | Reply To Topic