# Using NSolve and ContourPlot

Problem 6 a: Solve the equations x^2/9+y^2 /4=1, x^2-y^2=1 for {x,y}. b: Use NSolve to find approximate solutions to this set of equations. c: Now use 2-dimensional zooming and ContourPlot to find an approximation rounded to two places after the decimal point to this pair of equations.

New contributor
Victoria is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Clear["Global*"]

eqns = {x^2/9 + y^2/4 == 1, x^2 - y^2 == 1};

sol = NSolve[eqns, {x, y}]

(* {{x -> -1.86052, y -> -1.56893}, {x -> 1.86052, y -> 1.56893}, {x -> 1.86052,
y -> -1.56893}, {x -> -1.86052, y -> 1.56893}} *)


Verifying the solutions,

And @@@ (eqns /. sol)

(* {True, True, True, True} *)

pts = {x, y} /. sol;

Manipulate[
ContourPlot[
Evaluate@eqns,
{x, pts[[loc, 1]] - d, pts[[loc, 1]] + d},
{y, pts[[loc, 2]] - d, pts[[loc, 2]] + d},
Epilog -> {Red, AbsolutePointSize,
Point[{x, y} /. sol]},
ImageSize -> Medium],
{{loc, 1, "Intersection"}, Range},
{{d, 5, "Zoom"}, 0.01, 5, 0.01, Appearance -> "Labeled"}]
` 