The following problem appears in Chapter 8, "Differential Calculus of Scalar and Vector Fields", section 8.9, in Apostol's Calculus
- Let $T:\mathbb{R}^n\to\mathbb{R}^n$ be a given linear transformation. Compute the derivative $f'(\vec{x};\vec{y})$ for the scalar field defined on $\mathbb{R}^n$ by the equation $f(\vec{x})=\vec{x}\cdot T\vec{x}$.
$f'(\vec{x};\vec{y})$ is the derivative of scalar field $f$ at point $\vec{x}$ relative to vector $\vec{y}$.
We can find this derivative using the definition
$$f'(\vec{x};\vec{y})=\lim\limits_{h\to 0}\frac{f(\vec{x}+h\vec{y})-f(\vec{x})}{h}\tag{1}$$
$$= ...$$
$$=\vec{x}\cdot T\vec{y}+\vec{y}\cdot T\vec{x}\tag{2}$$
My question is: is $f$ differentiable?
The question arose when I wanted to calculate $f'(\vec{x};\vec{y})$ using $\nabla f\cdot \vec{y}$.
The latter can be used if the function is differentiable.
My initial attempt to find out involved the limit
$$\lim\limits_{\lVert v \rVert\to 0} E(\vec{a},\vec{v})=0\tag{3}$$
$$=\lim\limits_{\lVert v \rVert\to 0}\frac{f(\vec{a}+\vec{v})-f(\vec{a})-T_{\vec{a}}(\vec{v})}{\lVert v \rVert}\tag{4}$$
$$=\lim\limits_{\lVert v \rVert\to 0}\frac{\vec{a}\cdot T\vec{a}+\vec{a}\cdot T\vec{v}+\vec{v}\cdot T\vec{a}+\vec{v}\cdot T\vec{v}-\vec{a}\cdot T\vec{a}-T_{\vec{a}}(\vec{v})}{\lVert v \rVert}\tag{5}$$
$$=\lim\limits_{\lVert v \rVert\to 0} \frac{(\vec{a}+\vec{v})\cdot T\vec{v}+\vec{v}\cdot T\vec{a}-T_{\vec{a}}(\vec{v})}{\lVert v \rVert}\tag{6}$$
$$=\lim\limits_{\lVert v \rVert\to 0}\left ( (\vec{a}+\vec{v})\cdot T\left ( \frac{\vec{v}}{\lVert \vec{v} \rVert }\right )+\frac{\vec{v}}{\lVert \vec{v} \rVert }\cdot T\vec{a}-\frac{T_{\vec{a}}(\vec{v})}{\lVert v \rVert}\right )=0\tag{7}$$
And for this to be true it must be that
$$=\lim\limits_{\lVert v \rVert\to 0} T_{\vec{a}}(\vec{v})=\lim\limits_{\lVert v \rVert\to 0} \left ( (\vec{a}+\vec{v})\cdot T\vec{v}+\vec{v}\cdot T\vec{a} \right )\tag{8}$$
I'm not sure how to compute this limit, but it seems that $\lim\limits_{\lVert v \rVert\to 0} \vec{v}\cdot T\vec{v}$ should be zero since $\vec{v}$ is approaching the zero vector.
If so, then
$$\lim\limits_{\lVert v \rVert\to 0} T_{\vec{a}}(\vec{v})=\left ( \vec{a}\cdot T\vec{v}+\vec{v}\cdot T\vec{a} \right )\tag{9}$$
It's not clear to me what $\lim\limits_{\lVert v \rVert\to 0} T_{\vec{a}}(\vec{v})$ is exactly.
(9) must be true for it to be true that the error in the first-order Taylor polynomial approaches zero as $\vec{v}$ becomes very small.
(9) says that $T_{\vec{a}}(\vec{v})$ must approach the righthand side for any $\vec{v}$ as this vector becomes very small.
However, if I simply define
$$T_{\vec{a}}(\vec{v})= \vec{a}\cdot T\vec{v}+\vec{v}\cdot T\vec{a} \tag{10}$$
then I think (9) is true for any $\vec{v}$.
Write $T(x)=(\ell_{1}(x),\dots,\ell_{n}(x))$ where every $\ell_{i}$ is a linear function and notice that $x_{i}=p_{i}(x)$ where $p_{i}$ is the projection function which is also linear, then, $f(x)=\sum_{i=1}^{n}p_{i}(x)\ell_{i}(x)$. Now $D[f(x)](h)=\sum_{i=1}^{n}D[p_{i}(x)\ell_{i}(x)](h)=\sum_{i=1}^{n}(D[p_{i}(x)](h)\ell_{i}(x)+D[\ell_{i}(x)](h)p_{i}(x))=\sum_{i=1}^{n}(h_{i}\ell_{i}(x)+\ell_{i}(h)x_{i})=h\cdot T(x)+T(h)\cdot x$