This can be encapsulated in a function to make it easier to use
ClearAll@functionLabel;
SetAttributes[functionLabel, HoldAll];
functionLabel[function_] := Row[{HoldForm@TraditionalForm@function, " = ",
TraditionalForm@function}]
z[x_, y_] := Sin[x]*Cos[y]
Plot3D[z[x, y], {x, 0, Pi}, {y, 0, Pi}, PlotLabel -> functionLabel[z[x, y]]]
The MaTeX
paclet can be used to generate typeset labels. e.g.
f[x_] := Evaluate@Integrate[Sin[t], {t, 0, x}]
Plot[f[x], {x, 0, Pi},
PlotLabel -> MaTeX["f(\\text{x})\\text{ =}\\int_0^x \\sin (t) \\, dt", FontSize -> 16],
PlotTheme -> "Scientific",
PlotLabels -> "Expressions"]