Find all solutions for these two equations
To Plot the intersection points of the two contours we can also use the tricks of MeshFunction
and Mesh
BTW, I also belive that we can extract the intersection points from the ContourPlot
, but I'm unable to find the best way.
Clear["`*"]
fun1 = ((9/10)^x)*Cos[5 x] - y^3;
fun2 = x^2 + 1 x*y^2 + 3*y^4 - 8*y - 4;
a = ContourPlot[fun1 == 0, {x, -5, 5}, {y, -5, 5},
MeshFunctions -> {Function[{x, y}, fun1], Function[{x, y}, fun2]},
Mesh -> {{0}}, MeshStyle -> Directive[PointSize[Large], Red],
ContourStyle -> Purple];
b = ContourPlot[fun2 == 0, {x, -5, 5}, {y, -5, 5},
ContourStyle -> Cyan];
Show[b, a]
Try Graphics
MeshFindIntersections
bild = ContourPlot[{fun1 == 0, fun2 == 0}, {x, -5, 5}, {y, -5, 5}];
intersection points of the two curves in bild
s= Graphics`Mesh`FindIntersections[bild[[All, 1]]
(*{{-2.81431, 0.437137}, {-2.19896,0.101216}, {-1.57194, -0.197878},
{-0.931073,-0.395926},{-0.333723, -0.464556}, {0.333229, -0.449604},
{0.93169, -0.365035},{1.57238, -0.1831}, {1.72927, -0.122129},
{2.19959,0.109049}, {2.74194, 0.674778}}*)
Show[{bild, Graphics[Point[sp]]}]
Sorry, don't know why there is an additional wrong intersection point
You can use this function FindAllCrossings2D as follows
pts = FindAllCrossings2D[{fux[x, y], fuy[x, y]}, {x, -4, 4}, {y, -4,
4}, Method -> {"Newton", "StepControl" -> "LineSearch"},
PlotPoints -> 256, WorkingPrecision -> 20] // Chop
Then
Show[ContourPlot[{fux[x, y] == 0, fuy[x, y] == 0},
{x, -4, 4}, {y, -4,4}],ListPlot[pts]]
Note that the above link provides solutions based on MeshFunction
and ListPlot3D