How do to create 3D plot of ${t_{opt}} = {f_2}\left( {x,y} \right)$, where ${t_{opt}}$ is corresponding to maximum value of ${f_1}\left( {x,y,t} \right)$ at the limited ranges of $x,y,t$? If $t$ cannot be found directly from $\frac{{\partial {f_1}\left( {x,y,t} \right)}}{{\partial t}} = 0$.
For example $${f_1}\left( {x,y,t} \right) = \left| {\cos \left( t \right)} \right|\left( {\sin \left( x \right) + \cos \left( y \right)} \right) + \frac{{\sqrt t }}{{\ln \left( t \right)}}$$ $$x \in \left[ {0;10} \right],y \in \left[ {0;10} \right],t \in \left[ {2;10} \right]$$
I try to use this code
f1 = Abs[Cos[t]] (Sin[x] + Cos[y]) + Sqrt[t]/Log[t]
dfdt = Simplify[D[f1, t]]
tOpt = NSolve[dfdt == 0, t]
tOpt = tOpt[[1]][[1]][[2]]
Plot3D[tOpt, {x, 0, 10}, {y, 0, 10},
ColorFunction -> Function[{x, y, z}, Hue[z]]]
or
f1 = Abs[Cos[t]] (Sin[x] + Cos[y]) + Sqrt[t]/Log[t]
tOpt = NMaximize[{f1, t > 2, t < 10}, t]
tOpt = tOpt[[2]][[1]][[2]]
Plot3D[tOpt, {x, 0, 10}, {y, 0, 10},
ColorFunction -> Function[{x, y, z}, Hue[z]]]
Plot3D
andNMaximize
? Have you been able to write your function $f_1$ in Mathematica code? If yes, please include it in your question. $\endgroup$