# Findroot and plot not showing line

I need help solving this equation

$$2- 12 sin(3 x) - 6 x = 0$$

using FindRoot, but it does not seem to work.

For example,

NFindRoot[2 - 12 sin[3 x] - 6 x == 0, x].


I also need help with plotting of a different task.

I have

Arean = Solve[{A == xy, x^2 + y^2 == (2 r)^2, r == 3}, {A, y, r}]

and I need to plot it but the line doesn't show up.

I tried

Plot[A /. Last[Arean], {x, 0, 4}, AxesLabel -> {"x", "A"},
PlotStyle -> Green]

• FindRoot needs a starting search point. Also it is Sin not sin. Try FindRoot[2 - 12 Sin[3 x] - 6 x == 0, {x, 0}] and you get a root. If you plot it, you see where approximatly the roots are. Plot[2 - 12 Sin[3 x] - 6 x, {x, -3, 3}] Apr 26 at 8:02
• I suggest that you ask two different questions since they are so different in spirit. I believe that this is the general approach here Apr 26 at 8:03

Regarding the first part of your post, there are a number of mistakes. If you try

FindRoot[2 - 12 Sin[3 x] - 6 x == 0, {x, 1}]


The mistakes were that you should have used Sin instead of sin and the proper way to write the command is FindRoot

For the second question:

There is a mistake in your code and this is why the plot is not showing. You did not leave a space between the variables x and y

Try the following

Arean = Solve[{A == x y, x^2 + y^2 == (2 r)^2, r == 3}, {A, y, r}]

Plot[A /. Last[Arean], {x, 0, 4}, AxesLabel -> {"x", "A"},
PlotStyle -> Green]


for the first part, you can first find the solutions

sol = Flatten[
Table[FindRoot[2 - 12 Sin[3 x] - 6 x == 0, {x, i}], {i, -2, 2}]]
{x->-1.6325,x->-1.39504,x->0.047759,x->1.19582,x->1.81603}


and then you can check these solutions as follows

  ContourPlot[{2 - 12 Sin[3 x] - 6 x == y, y == 0}, {x, -3, 3}, {y, -1,
1}, Epilog -> {Red, AbsolutePointSize,
Point[Table[{sol[[i, 2]], 0}, {i, 5}]]}] the solutions are the red dots.

You can also use Solve or NSolve.

NSolve[2 - 12 Sin[3 x] - 6 x == 0, x, Reals]


{{x -> -1.6325}, {x -> -1.39504}, {x -> 0.047759}, {x -> 1.19582}, {x -> 1.81603}}

Plot[2 - 12 Sin[3 x] - 6 x, {x, -6, 6}, MeshFunctions -> {#2 &},
Mesh -> {{0}}, MeshStyle -> Red] 