Plot[{Tan[x], x Sin[x]}, {x, -8, 8}, MeshFunctions -> {Tan[#] - #
Sin[#] &}, Mesh -> {{0.0}}, MeshStyle -> Directive[Red,
PointSize[Large]]]
Just as the picture shows, there are some incorrect points around the intersection point.
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityWhen using MeshFunctions
, it is often a good idea to reformulate your functions so that it is free of poles or other singularities:
Plot[{Tan[x], x Sin[x]}, {x, -8, 8},
MeshFunctions -> {Sin[#] - # Sin[2 #]/2 &}, Mesh -> {{0}},
MeshStyle -> Directive[Red, PointSize[Large]]]
Similar principles apply to the use of e.g. FindRoot[]
for finding intersections.