# How to declare a function as real in order to get rid of Conjugate in front of the expressions?

I have a complicated complex function containing some other ones that are real, f=f(A,B,C,...) ,where A=A(r) and it is real, for example. When I do Conjugate[f] I get something like Conjugate[f]=f*=f*(Conjugate[A],Conjugate[B],...), I mean those internal function arent interpreted as real. I tried ComplexExpand to work with it by assuming that those internal functions are real, but it does not work. I also tried $Assumptions={A,B,...}\[Element] Reals at the beginning of the nb, and nothing. What I want is to Simplify some expressions like (-I A)(I A)=A^2, but I only get Conjugate[A] A. Is there some way to declare these internal functions as real, even they are part of a larger more complicated complex function? ## 2 Answers Your assumption should be made on the value of g[_], not of plain g. Otherwise, your assumption can be introduced globally through $Assumptions, or as a second argument to Simplify, or using Assuming, all with the same result.

Clear[f, g, r]
f[arg_] := a - I arg

Conjugate[f[g[r]]]
(* Out: Conjugate[a] + I Conjugate[g[r]] *)

Assuming[g[_] ∈ Reals, Simplify[ Conjugate[f[g[r]]] ] ]
(* Out: Conjugate[a] + I g[r] *)

• You probably meant \$Assumptions Jul 6 '15 at 6:02
• @belisarius I certainly did! Thanks for catching that. Jul 6 '15 at 6:04
• @MarcoB . Thank you. Jul 6 '15 at 6:16

Here is another possible solution which doesn't require you to use Simplify:

Clear[f, a, g, r]
f[arg_] := a - I arg

Conjugate[g[r_]] ^:= g[r]

Conjugate[f[g[r]]]

(* ==> Conjugate[a] + I g[r] *)


This uses UpSetDelayed to make the desired assumption part of the definitions associated with g.

• Very elegant! (+1) Jul 6 '15 at 17:29