You could just use Solve
:
sols = Solve[1/4 x^2-3 Cos[6 x]-7/5==0,x,Reals]
{{x -> Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, -4.1944195824709601156}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, -4.1443220023851876569}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, -3.32475678696060154959}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, -2.9209295073933144008}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, -2.3568247304438990610}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, -1.79958153941302338362}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, -1.36189787914973414618}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, -0.71235207082364557790}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, -0.34089931495521312949}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, 0.34089931495521312949}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, 0.71235207082364557790}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, 1.36189787914973414618}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, 1.79958153941302338362}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, 2.3568247304438990610}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, 2.9209295073933144008}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, 3.32475678696060154959}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, 4.1443220023851876569}]}, {x ->
Root[{-28 - 60 Cos[6 #1] + 5 #1^2 &, 4.1944195824709601156}]}}
The above results are exact. To get approximate results, just use NSolve
instead, or apply N
to the above result:
N[sols, 20]
{{x -> -4.1944195824709601156}, {x -> -4.1443220023851876569}, {x ->
-3.3247567869606015496}, {x -> -2.9209295073933144008}, {x ->
-2.3568247304438990610}, {x -> -1.7995815394130233836}, {x ->
-1.3618978791497341462}, {x -> -0.71235207082364557790}, {x ->
-0.34089931495521312949}, {x -> 0.34089931495521312949}, {x ->
0.71235207082364557790}, {x -> 1.3618978791497341462}, {x ->
1.7995815394130233836}, {x -> 2.3568247304438990610}, {x ->
2.9209295073933144008}, {x -> 3.3247567869606015496}, {x ->
4.1443220023851876569}, {x -> 4.1944195824709601156}}