Last Updated 10/28/2022

Sage Essentials
Section 4: Solving Equations

The solve command

Example 2

Sometimes you will want to select one solution from the list of solutions and use it in another computation. You can do this by first assigning a name (we use the letter S in this case) to the output of the solve command.

 

 

Then S[0] is the first expression in the solution sequence, S[1] is the second expression and so on.

 

 

To extract the numbers from the expressions, use the rhs command.

 

Try this!

Find the sum of the solutions of the quadratic equation 3 x 2 16x+5=0 . Convert the answer to numerical value.


← Previous Example Next Example →