Orthogonal functions and different function arguments

This should be a fairly trivial question, but I would like to support my current intuition.

Let's consider two orthogonal functions $f$ and $g$, i.e. two function whose inner product is equal to zero over a certain domain $D$ (the weight function is omitted for simplicity):$$\int_D f(x)g(x) dx= 0$$

Does the orthogonality of the two functions hold only if the functions have the same arguments? In other words, would the following be true? $$\int_D f(y)g(x) dx= 0\space(1)$$

Well the equation above does not make much sense, since the $y$ argument is not specified. Let's say that $y$ itself depends on $x$, i.e. it exists a function $t$ such that $y = t(x)$. My guess is that $(1)$ is not true. In fact, if we consider $k(x) = (f \circ t)(x) = f(t(x))$, then we get:

$$\int_D k(x)g(x) dx= 0$$

Which it does not necessary hold, since the orthogonality between $k$ and $g$ must be proven in its own rights.

To summarize:

Am I correct in saying that the following is not true in the general case (although it could be true for same special cases, es. when $t$ is the identity function)?

$$\int_D f(y)g(x) dx= 0 \land y = t(x) \land k(x) = (f \circ t)(x) = f(t(x)) \Rightarrow \int_D k(x)g(x) dx= 0$$

Finally, what if $f$ and $g$ were elements of an orthonormal basis function set, would this make any difference?

The actual problem:

I'm currently doing some work involving spherical harmonics. At one point I found myself faced with the following equation:

$$h = \int_S Y_l^m(\vec n_x)Y_{l'}^{m'}(\vec x)dx\space(2)$$

Where $S$ is the surface of a 3D model, $dx$ is the area element of this surface, $\vec x$ is the position of each area element and $\vec n_x$ is the model's normal at the $\vec x$ position (note: SH functions are usually defined over the two angles $\theta$ and $\phi$. Please assume that these angles are implicitly represented by the directions of $\vec x$ and $\vec n_x$).

Initially, I thought that the solution for $(2)$ was $h = 1$ if $m = m'\land l = l'$ and $h = 0$ otherwise, but now I'm convinced that given the different arguments, $\vec x$ and $\vec n_x$, this is not necessarily the case. Is my thinking right?

Yes, you're right that the arguments must be the same for orthogonality to hold, and your intuition is spot on about why this should be so. In your example,

$$\int_D f(t(x))g(x)$$

one way to see this is to take $t(x)$ something dumb, like a constant function. For example, let's have

$$f = \cos, g = \sin, t(x) = 0$$

so:

$$\int_0^\pi \cos(x)\sin(x) = 0$$

but

$$\int_0^\pi \cos(t(x))\sin(x) = \int_0^\pi \cos(0)\sin(x) = \int_0^\pi 1\cdot\sin(x) = 2$$

• Great! Feel good to be right :) I have still a doubt though. Orthogonality might still hold in same cases (es. when t is the identity function). Do you think that the case I mentioned in the end on my question is one of these special cases for which orthogonality continues to hold? I think not... – Geoffrey91 Feb 11 '16 at 17:48
• Which question? Do you mean: "what if $f$ and $g$ are elements of an orthonormal basis function set?" – Eli Rose Feb 11 '16 at 18:37
• Not only that (although having a question for that would be useful), but also regarding the "The actual problem" section of my question. – Geoffrey91 Feb 11 '16 at 18:41