Last Updated 10/28/2022

Sage Essentials
Section 4: Solving Equations

The find_root and roots command

Example 1

Sometimes, the solve command may fail to find all the solutions of an equation. For example, let use try to find the solutions of sinx= 1 2 .

 

Note that only the solution in the first quadrant is found, namely π 6  or 0.523598775598299.

To locate other solutions, we can use the find_root command.  The find_root command looks for a solution of an equation in a particular interval.

 

Let us locate a solution of sinx= 1 2  on each of the intervals  [ 0, π 2 ] and [ π 2 ,π ] .

 

Try this!

What happen if we try to look for a solution of sinx= 1 2 on [ π,2π ] .


← Previous Example Next Example →