# Plot in solid temperature

Given the function f : R^3 -> R defined by:

f(x, y, z) := x e^(y^2 + z^2)

you will determine the points of maximum and minimum for f constrained to:

D := { (x, y, z) \in R^3 : 0 <= x <= 1 - y^2 - z^2 }.

Now, analytically is all very simple, however, since f is not possible to draw the graph (need one 4-dimensional space) I thought to consider f as a function that at every point in 3D space associated with a temperature represented by a graduated scale colors.

I was wondering if someone could point a way to plot D in Wolfram Mathematica coloring each own point according to the function f, so you can find the minimum and the absolute maximum by colors.

Thank you!

I thought DensityPlot3D, but I think in Wolfram Mathematica 11.0 there is a problem:

and the same happens to me in the main window.

To you it does not happen on Windows 8.1, 64 bits? :(

Through code:

A = ImplicitRegion[0 <= x <= 1 - y^2 - z^2, {x, y, z}];
SliceDensityPlot3D[
x E^(y^2 + z^2), {x == 0, x == 1 - y^2 - z^2}, {x, y, z} \[Element]
A, AxesLabel -> Automatic, ColorFunction -> "Rainbow",
PlotLegends -> Automatic]


I get:

which is almost what I want. How do I delete those nasty "holes"?

• Have you seen DensityPlot3D[]? Commented Jan 23, 2017 at 18:11
• Then, please also include the OS you are using. Commented Jan 23, 2017 at 18:21
• If DensityPlot3D[] does not work for you because of bugs, you could consider using SliceContourPlot3D[] - at example: SliceContourPlot3D[ x*Exp[y^2 + z^2], {"YStackedPlanes", 10}, {x, y, z} \[Element] ImplicitRegion[0 <= x <= 1 - y^2 - z^2, {x, y, z}]] Commented Jan 23, 2017 at 18:48
• Have you tried disable anti-aliasing? Commented Jan 23, 2017 at 19:09
• I meant, disable it in the preferences. Commented Jan 23, 2017 at 19:38

RegionPlot3D[
0 <= x <= 1 - y^2 - z^2 && -1 <= y <= 1 && -1 <= z <= 1,
{x, 0, 1}, {y, -1, 1}, {z, -1, 1},
AxesLabel ->
(Style[#, 14, Bold] & /@ {x, y, z}),
ColorFunction -> Function[{x, y, z},
ColorData["Rainbow"][x E^(y^2 + z^2)]],
ColorFunctionScaling -> False,
MeshFunctions ->
Function[{x, y, z}, x E^(y^2 + z^2)],
BoxRatios -> {1, 1, 1},
PlotPoints -> 75,
PlotLegends -> BarLegend["Rainbow"]]