Why my variational method don't work here.

Hello, I am a new learner. I follow a note with Mathematica code in it. I wonder how can I show a conjugate function. For example, if I have a function: g(x,y,z), how can I write its conjugate form. Thanks.

Sorry, the title is not proper.