# A question regarding 3D plot

Updated

I have an equation:

$$x (z \ln z) = y$$.

For different values of $$x$$ and $$y$$ we can solve this equation for z, for example, for $$x = 3$$ and $$y =1$$, we have:

FindRoot[3 z Log[z] == 1, {z, 0.1, 5}]

I like to have a 3D plot, where $$x$$ varies, for example, from $$1$$ to $$3$$, and $$y$$ from $$2$$ to $$4$$, and the third dimension to be the solutions of the equation, that is, $$z$$. How can I implement this in Mathematica?

Edit:

I need the command for solving the equation to be FindRoot.

• Why do you need the command to be FindRoot? Is this a homework assignment? – N.J.Evans Oct 15 '19 at 13:03
• For comparison, ContourPlot3D enables plotting without an explicit solution. ContourPlot3D[x z Log[z] == y, {x, 1, 3}, {y, 2, 4}, {z, 1.5, 3.5}, AxesLabel -> Automatic] – Bob Hanlon Oct 15 '19 at 13:12
• @N.J.Evans The real equation that I wanted to solve it's only solvable with FindRoot. – user67794 Oct 19 '19 at 19:59
• @BobHanlon Thanks! – user67794 Oct 19 '19 at 20:00

You can solve your equation for z

sol = Solve[x z Log[z] == y, z][[1]]
(*{z -> y/(x ProductLog[y/x])}*)

and plot z

Plot3D[z /. sol, {x, 1, 3}, {y, 2, 4}, AxesLabel -> Automatic]

numerical approach:

solu[x_?NumericQ, y_?NumericQ] :=z /. FindRoot[x z Log[z] == y, {z, 1}]
Plot3D[solu[x,y], {x, 1, 3}, {y, 2, 4}, AxesLabel -> Automatic]

• Thanks! I need to use FindRoot command. Can I just replace Solve with FindRoot? – user67794 Oct 15 '19 at 11:05
• The advantage of the symbolic solution would be lost. I'll modify my answer. – Ulrich Neumann Oct 15 '19 at 12:17