Mathematica can find the exact solutions of some equations.

Solve[2 (x^2)-7 x+1==0,x]

Or, more complicated

Solve[(x^4)==(3^x),x]

Sime of the above solutions are complex numers.

To limit solutions to reals we can use the optional variable Reals.

Solve[(x^4)==(3^x),x,Reals]

Sometimes it is convenient to have the solutions listed in a list. That is achieved with the following code:

x/.Solve[(x^4)==(3^x),x,Reals]

And sometimes it is convenient to name the list of solutions:

soll=(x/.Solve[(x^4)==(3^x),x,Reals])

Then, I can get individual solutions using the following code

soll[[1]]

soll[[2]]

soll[[3]]

To get the numerical approximations

N[soll]

Or if you want it really accurate

N[soll,100]

However, most equations cannot be solve in “closed form”

Solve[Sin[x]==Exp[-x],x]

For such equations we can find numerical approximations for the solutions. Before that it is a good idea to have a picture in mind.

Plot[{Sin[x],Exp[-x]},{x,-Pi,5Pi}]

If I am interested in the solution which is close to 1, this is how I would ask Mathematica to find it:

FindRoot[Sin[x]==Exp[-x],{x,1}]

An approximation of the solution near Pi is

FindRoot[Sin[x]==Exp[-x],{x,Pi}]

near 2 Pi

FindRoot[Sin[x]==Exp[-x],{x,2Pi}]

and so on ....

To get more accurate solutions, we need to introduce Oprions:

FindRoot[Sin[x]-Exp[-x],{x,1},AccuracyGoal->Infinity,PrecisionGoal->100,WorkingPrecision->100]

Or we can name this solution

s0=(x/.FindRoot[Sin[x]-Exp[-x],{x,1},AccuracyGoal->Infinity,PrecisionGoal->100,WorkingPrecision->100] )

s1=(x/.FindRoot[Sin[x]-Exp[-x],{x,Pi},AccuracyGoal->Infinity,PrecisionGoal->100,WorkingPrecision->100])

s2=(x/.FindRoot[Sin[x]-Exp[-x],{x,2Pi},AccuracyGoal->Infinity,PrecisionGoal->100,WorkingPrecision->100])

and so on

SEsoll = Table[x/.FindRoot[Sin[x]-Exp[-x],{x,k Pi},AccuracyGoal->Infinity,PrecisionGoal->16,WorkingPrecision->16] ,{k,0,5}]

In fact I could list many solutions in one command

It is remarkable how Mathematica provides an accurate graph of the function from the second assignment.

Plot[x Floor[1/x],{x,-3,3}]