0
$\begingroup$

I want mathematica to factor the quadratic polynomial $a x^2 +b x +c$ into this standard form $a(x-r_1)(x-r_2)$ with $r_1=-\frac{b}{2a}+\frac{\sqrt{b^2-4ac}}{2a}$ and $r_2=-\frac{b}{2a}-\frac{\sqrt{b^2-4ac}}{2a}$. I tried Factor and its Extension option but I could not get anyting.

$\endgroup$
1
$\begingroup$
a Times @@ (y - # & /@ (x /. Solve[a x^2 + b x + c == 0, x]))
$\endgroup$
  • $\begingroup$ (+1) Thanks. :) But, why they really made Factor? :D Also, you missed the coefficient $a$. :) $\endgroup$ – H. R. Mar 7 '18 at 17:13
  • 1
    $\begingroup$ @H.R. This is similar to mathematica.stackexchange.com/a/8258/4999 $\endgroup$ – Michael E2 Mar 7 '18 at 17:28
  • $\begingroup$ @MichaelE2: Yes, you are right. I just saw that before you mentioned. :) Thanks by the way. :) $\endgroup$ – H. R. Mar 7 '18 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.