# Is it possible to define conjugate of a function?

Could you help me, please? I have two complex functions of real variable f[x] and fc[x] such that one is a conjugate of another one. I'd like to take a conjugate of an expression that includes both of these functions. Is it possible to define Conjugate operation for both of these functions?

I'm looking for something like that:

Conjugate[f[x_]] := fc[x];

Conjugate[fc[x_]] := f[x];

Eq = Conjugate[2f[x] + fc[x]]

I'd like to get Eq = 2 fc[x] + f[x]

Conjugate[f[x_]] := fc[x]; will fail because MMA tries to store this rule under Conjugate, which is protected.

However, you may store it under f by using up-set or up-set-delayed:

Conjugate[f[x_]] ^:= fc[x];

Conjugate[fc[x_]] ^:= f[x];

Eq = Conjugate[2 f[x] + fc[x]]

(* f[x] + 2 fc[x] *)

• Fantastic! It is exactly what I was looking for! Thank you! Apr 20, 2021 at 18:41
Conjugate[2 f[x] + fc[x]] /. {Conjugate[f[x]] -> fc[x], Conjugate[fc[x]] -> f[x]}
(*    f[x] + 2 fc[x]    *)