Solve cubic equations using graphs.