# 3D representation of a transcendental equation

Given a transcendental equation $F * exp [x] + x * y + sqrt[F-y] = 0$, is there a way for Mathematica to automatically 3D-plot F[x,y] depending on x and y ?

• I wouldn't call that a transcendental equation, for the very reason that you can actually just solve for F in terms of elementary functions, as shown by @Kuba. – march Jan 13 '16 at 16:10
• @Kuba. Oh right! Got the names switched. – march Jan 13 '16 at 17:01

The simplest method would be just

ContourPlot3D[F Exp[x] + x y + Sqrt[F - y] == 0, {x, -2, 2}, {y, -2, 2}, {F, -2, 2}] Unfortunately there are some problems because the Sqrt term is complex sometimes. A better plot is obtained by squaring the equation and using RegionFunction to eliminate the extra solutions:

ContourPlot3D[(F Exp[x] + x y)^2 == F - y, {x, -2, 2}, {y, -2, 2}, {F, -2, 2},
RegionFunction -> Function[{x, y, F}, F Exp[x] + x y < 0]] Not a great deal. First you solve it:

    sl = Solve[F*Exp[x] + x*y + Sqrt[F - y] == 0, F]

(*  {{F -> 1/2 E^(-2 x) (1 - 2 E^x x y - Sqrt[
1 - 4 E^(2 x) y - 4 E^x x y])}, {F ->
1/2 E^(-2 x) (1 - 2 E^x x y + Sqrt[1 - 4 E^(2 x) y - 4 E^x x y])}}  *)


and then plot:

 Plot3D[{sl[[1, 1, 2]], sl[[2, 1, 2]]}, {x, -1, 1}, {y, -1, 1},
PlotStyle -> {Blue, Orange}]


and should see this: Have fun!

• Try evaluating F*Exp[x] + x*y + Sqrt[F - y] /. sl /. {x -> -1, y -> -1}: neither "solution" satisfies the original equation. – Rahul Jan 13 '16 at 16:42