# Inner Product Differentiation Rule

The dot product differentiation rule is $$(\vec f(t) \cdot \vec g(t))' = \vec f\ '(t) \cdot \vec g(t) + \vec f(t) \cdot \vec g\ '(t)$$, which simplifies to $$(\vec f(t) \cdot \vec f(t))' = 2(\vec f\ '(t) \cdot \vec f(t))$$ when we plug a single vector in for both $$\vec f(t)$$ and $$\vec g(t)$$. For example, we find the same answer of $$36t^3 + 2t + 4$$ whether we plug $$\begin{bmatrix}t + 2 \\ 3t^2\end{bmatrix}$$ into the LHS or the RHS of the simplified equation. However, when the vectors are functions, I'm having trouble applying this to inner product differentiation.

Let's use the inner product $$\int_{-1}^1 f(t)g(t)\ dt$$ and the vector $$2t^3 + 10$$. It seems to me that we should find $$(\int_{-1}^1 (2t^3 + 10)(2t^3 + 10)\ dt)' = 2\int_{-1}^1 (6t^2)(2t^3 + 10)\ dt$$, by matching the form of the dot product analog. Unfortunately, this LHS must be $$0$$ (independent of the choice of vector), since the definite integral it contains must return a constant. The RHS is more interesting and works out to $$80$$, which is more reasonable. Why does this calculation fail, and what is the correct way to migrate the dot product example into an inner product one?

• I think some of the confusion might come from these not being precisely analogous cases. In the first instance, you have a function that takes in a variable t and returns a vector. In the second instance, you just have a vector, which happens to be a function. To make it the same, I think you'd need a function that returns a function. The second function is the vector. – Cordello Apr 5 '19 at 2:38

The RHS of your integral example doesn't make sense. You have tried to use $$\frac{d}{dt}\int_a^b f(t) \,dt=\int_a^b \frac{df}{dt} \,dt$$This is simply not true. What is possible is $$\frac{d}{dx}\int_a^b f(x,t) \,dt=\int_a^b \frac{\partial}{\partial x} f(x,t)\,dt$$This is how your rule would apply in the functional case - you'd need functions of multiple variables, and these extra variables are what you differentiate with respect to.
If you did not have this, then $$\langle f,g\rangle$$ is just a constant, analogous to the dot product between two constant vectors - there is nothing to differentiate with respect to. In the vector case, we were able to differentiate them by promoting them to functions of an extra variable than they originally had - from $$0$$ to $$1$$. We need to do something similar for functions, but then to promote them from single-variable functions to multi-variable functions.
• I can't see how my mistake is arbitrarily swapping the derivative and definite integral operators. The only move I made was pattern matching $(\vec f(t) \cdot \vec f(t))' = \vec f\ '(t) \cdot \vec f(t) + \vec f(t) \cdot \vec f\ '(t) = 2(\vec f\ '(t) \cdot \vec f(t))$. In inner product terms, this should translate to $⟨f, f⟩' = ⟨f', f⟩ + ⟨f, f'⟩ = 2⟨f', f⟩$. This seems to justify the derivative operator ending up inside the inner product. As for the promotion to multivariable function, would $f(x(t), t)$ do the job? – user10478 Apr 5 '19 at 14:46
• Explicitly, what I mean is that you appear to have done $$\frac{d}{dt}\int_a^bf(t)f(t)dt=\int_a^b\frac{d}{dt}(f(t)f(t))dt=2\int_a^bf'(t)f(t)dt$$which $\textit{is}$ arbitrarily swapping the integral and derivative. However, I can also see what you mean by the use of analogies. In this case, all I can say is that the identity does not hold here. It only held in the original vector case due to the fact that the inner product output a function, whereas here, it does not. For $x(t)$, I'm not totally sure, but think it should be ok, as long as you're careful with partial derivatives. – John Doe Apr 5 '19 at 15:28
• No, that answer is not incorrect. The difference is that in that example, they aren't specifically talking about the inner product you described here (with the integral). They are talking about a general inner product where the output is a function (of $t$). In your function example, this can be replicated if we make sure that the output is still a function of something. However, since $t$ is integrated over, we have to add a variable, hence the multivariable step. – John Doe Apr 6 '19 at 14:02