Skip to main content

plotting - How do I show intersecting points of three functions in 3D?



I'm trying to plot the following 3 functions:



  • $f_1 = x^2 + y - 37 = 0$

  • $f_2 = x - y^2 - 5 = 0$

  • $f_3 = x + y - 3 - z = 0$



Plot3D[{x^2 + y - 37, x - y^2 - 5, x + y + z - 3}, {x, -10, 10}, {y, -10, 10}, {z, -10, 10}]


but it gives me a error. How do I fix this? Also is there any way to show graphically where the 3 functions intersect, say with a red dot or something?


Thank you for the help in advance.



Answer



s = Solve[{x^2 + y - 37 == 0, x - y^2 - 5 == 0, 
x + y + z - 3 == 0}];

Two solutions.


Show[ContourPlot3D[{x^2 + y - 37 == 0, x - y^2 - 5 == 0, 
x + y + z - 3 == 0}, {x, -10, 10}, {y, -10, 10}, {z, -10, 10},

ContourStyle ->({#, Opacity[0.8]} &) /@ {Green, Yellow, Orange}],
Graphics3D[{Red, Sphere[{x, y, z} /. s[[#]]] & /@ {1, 2}}]]

enter image description here


Comments