Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a function

f[c_] := y^2 - 2 x^2 (x + 3) == c ((y + 1)^2 (y + 9) - x^2)

I need to find the points of intersection between the plots of f[0] and f[2]. How can I find these intersections?

Also, how can I visualize the intersections of the five curves f[-1], f[0], f[1], f[e], and f[-Pi]?

share|improve this question

closed as off-topic by wxffles, Jens, rasher, Artes, Yves Klett May 20 at 10:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – wxffles, Jens, rasher
If this question can be reworded to fit the rules in the help center, please edit the question.

NSolve[f[0] && f[2]]? –  wxffles May 20 at 4:45
Could you comment on how you determine your x and y values? f(-1) won't be very meaningfull unless the x and y values are specified. –  olliepower May 20 at 6:35
possible duplicate of How to get intersection values from a parametric graph? –  Artes May 20 at 10:01
This finds all the solutions: {x, y} //. {ToRules[Reduce[{f[0], f[2]}, {x, y}]]} // N. –  Stephen Luttrell May 20 at 14:40

2 Answers 2

Nice curves.

f[c_] := y^2 - 2 x^2 (x + 3) == c ((y + 1)^2 (y + 9) - x^2);
  Block[{allPairsOfCurves, x, y, allPointsOfIntersection},
    allPairsOfCurves = Subsets[curves,{2}];
    allPointsOfIntersection = Flatten[{x, y} /. NSolve[#, {x, y}, Reals]& /@ allPairs, 1];
    Return[DeleteDuplicates @ allPointsOfIntersection];];
curves = {f[-1], f[1], f[22], f[1000], f[123123]};
p = findPointOfIntersection[curves];
ContourPlot[Evaluate[curves], {x, -10, 10}, {y, -10, 10}, 
  Epilog -> {Red, PointSize[Large], Point[p]}]

enter image description here

share|improve this answer

if you want plot, then may be like this:

SetAttributes[f, Listable];
f[c_] := y^2 - 2 x^2 (x + 3) == c ((y + 1)^2 (y + 9) - x^2)
plot[input_] := 
 ContourPlot[Evaluate[f[input]], {x, -6, 5}, {y, -10, 10}, 
  Frame -> False, Axes -> True]

plot[{-1, 0, 1, E, -Pi}]

enter image description here

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.