0
$\begingroup$
{Sin[x+y],Cos[x-y],x^2+y^2-z}

I've tried to use the FindRoot function, which gives me an answer. However, it also says "Failed to converge to the requested accuracy or precision within 100 iterations".

g1 = FindRoot[{Sin[x + y], Cos[x - y], x^2 + y^2 - z}, {x, 0, 2 Pi}, {y, 0, 2 Pi}, {z, 0, 2 Pi}]

I also tried:

NSolve[{Sin[x + y], Cos[x - y], x^2 + y^2 - z}]

but that said "inverse functions are being used by NSolve, so some solutions may not be found; use Reduce for complete solution information. When I use Reduce, I get the following as my answer "Reduce[{Sin[x + y], Cos[x - y], x^2 + y^2 -z}]".

I also tried to plot the three functions, to look to see where the graphs intersect, and then I would determine the roots by choosing an estimated value. However, I can't figure out the code for graphing all three of them because the last one has a third variable.

$\endgroup$
  • $\begingroup$ As I understand, you want to find where all 3 functions are zeros? $\endgroup$ – m0nhawk Apr 2 at 2:21
  • $\begingroup$ Yes exactly, where they would all intersect. $\endgroup$ – Claire Apr 2 at 2:22
  • 2
    $\begingroup$ You need to make it an equation in order to be able to solve/reduce: Reduce[{Sin[x + y], Cos[x - y], x^2 + y^2 - z} == 0, {x, y, z}] $\endgroup$ – bill s Apr 2 at 2:22
  • $\begingroup$ @bills you can post this as an answer. $\endgroup$ – m0nhawk Apr 2 at 2:25
2
$\begingroup$

One problem is that Solve and Reduce and similar functions require complete equations. Hence:

Reduce[{Sin[x + y], Cos[x - y], x^2 + y^2 - z} == 0, {x, y, z}] 

gives a nice set of answers.

| improve this answer | |
$\endgroup$
1
$\begingroup$

Restricting all variables, you get a few single points

Solve[{0 < z < 2 Pi, 0 < x < 2 Pi, 0 < y < 2 Pi, Sin[x + y] == 0, 
       Cos[x - y] == 0, x^2 + y^2 - z == 0}, {x, y, z}, Reals
 ]

(*   {{x -> \[Pi]/4, y -> (3 \[Pi])/4, z -> (5 \[Pi]^2)/8}, 
      {x -> (3 \[Pi])/4, y -> \[Pi]/4, z -> (5 \[Pi]^2)/8}}   *)

ContourPlot3D[
  Evaluate@Thread[{Sin[x + y], Cos[x - y], x^2 + y^2 - z} == 0], 
{x, 0,2 Pi}, {y, 0, 2 Pi}, {z, 0, 2 Pi}, 
ContourStyle -> {Red, Green, Blue}]
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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