HP Forums

Full Version: Quadratic Formula Is there an app to plug in numbers?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Has somebody made an app that you plug in numbers in the quadratic Formula an you get your 2 answers? I want it to make school easy. Thanks for your time.
Why would you want to do that? The Prime can solve quadratics without a program already.

E.g.

Code:
CAS.zeros('X²-6*X+2')
            [5.6457....... 0.354248.....]
You have also the built-in Explorer app.
If those don't work for you, this is a nice little exercise for you to program yourself.
(10-20-2020 06:56 PM)Didier Lachieze Wrote: [ -> ]You have also the built-in Explorer app.

Which can even be invoked directly
Code:
QuadSolve(1,0,-4)       {-2,2}
I think the best tool Prime provides to solve polynomials is the command: proot.

I prefer proot for the following reasons
  • Faster to type. Just enter the coefficients in brackets [ ]. Rather than typing an equation.
  • Solves for real and complex roots. The methods mentioned above do not compute complex roots.
The command proot is accessed with the Toolbox key > CAS menu > 6. Polynomial > 1. Find Roots

Example: Find roots for x^2+4x+5.
Code:
proot([1,4,5])                    [(-2,-1)  (-2,1)]

There are other useful commands in the Polynomial menu too. Such as solving for the coefficients instead of the roots. I recommend it.
(10-20-2020 05:32 PM)Subaru Wrote: [ -> ]Has somebody made an app that you plug in numbers in the quadratic Formula an you get your 2 answers? I want it to make school easy. Thanks for your time.

Hello Subaru,
Welcome!
Don’t be afraid, there is no stupid question here, we are all here to help you, and as you see, there are plenty of answers, even if we all think that there is no need to program the quadratic formula.
(10-21-2020 06:36 PM)Carsen Wrote: [ -> ]I think the best tool Prime provides to solve polynomials is the command: proot.

I prefer proot for the following reasons
  • Faster to type. Just enter the coefficients in brackets [ ]. Rather than typing an equation.
  • Solves for real and complex roots. The methods mentioned above do not compute complex roots.
The command proot is accessed with the Toolbox key > CAS menu > 6. Polynomial > 1. Find Roots

Example: Find roots for x^2+4x+5.
Code:
proot([1,4,5])                    [(-2,-1)  (-2,1)]

There are other useful commands in the Polynomial menu too. Such as solving for the coefficients instead of the roots. I recommend it.

Quadsolve does solve for complex roots

Try
Code:
QuadSolve(1,-1,6^2+31^2)

Gives
Code:
{0.5+31.5713477698*i,0.5-31.5713477698*i}
Reference URL's