# When should I put an absolute value sign around a function?

In Griffiths' introduction to QM book, I see $\int f^* f\ dx$ often written as $\int | f |^2 dx$, whereas $\int f^* g\ dx$ is understandably just that. Should I always write the absolute value sign to be safe? (For example, $\int |f^* g|\ dx$)

-

## migrated from physics.stackexchange.comSep 29 '11 at 16:23

This question came from our site for active researchers, academics and students of physics.

You must not replace $\int f^* g$ with $\int |f^* g|$, because the things being integrated are not equal. The absolute value of a complex number is defined as
$$|z| = \sqrt{a^2 + b^2}$$
for z=a+ib with a,b real. It is easy to see that $|f|^2 = f^*f$, and this is an alternate definition of the absolute value. But it is just not true that $f^*g = |f^*g|$, because the left side is complex, while the absolute value is real.
Note that $f^*$ is used for complex conjugate of $f$ (when $f$ has complex values). –  GEdgar Sep 29 '11 at 17:58