Suppose that we need to graphically solve the equation x^3=cos x. In order to do this we shall isolate each side of the equation and represent it as a separate function. Thus, we shall consider two functions y=x^3 and y=cos x. Now we can plot both of them in one picture. In order to start our investigations, we will use intervals -2<x<2 and -2<y<2.
Step 1
The first plot will give us a rough idea where
intersection of both curves is located.
plotfunc2d(x^3, cos(x), x=-2..2, y=-2..2)
Step 2
We can choose a narrower interval for our
plot.
plotfunc2d(x^3, cos(x), x=0.8..1, y=0.5..0.8)
Step 3:
Much narrower intervals, here
x=0.8654..0.8655 and y=0.6482..0.6484 require more
precise definition of labels on both axes. Here
distance between two consecutive ticks is 0.000025
unit.
tx := 0.8654+i*0.000025 $ i = 0..4:
Tx := [op(tx,i)=expr2text(op(tx,i)) $ i=1..nops(tx)]:
ty := 0.6482+i*0.000025 $ i = 0..4:
Ty := [op(ty,i)=expr2text(op(ty,i)) $ i=1..nops(ty)]: