1
$\begingroup$

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.

$\endgroup$

1 Answer 1

1
$\begingroup$
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[6],
    Point[{x, y} /. sol]},
  ImageSize -> Medium],
 {{loc, 1, "Intersection"}, Range[4]},
 {{d, 5, "Zoom"}, 0.01, 5, 0.01, Appearance -> "Labeled"}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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