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$
2

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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