Partial derivative form question

48 Views Asked by At

It's my understanding the partial derivative can take the following form:

pd1 pd2

Where $y_0$ is held constant as a plane slicing and $x_0$ is the point where the derivative is taken with respect to $x$.

I'm confused by the following notation in a Rojas AI book: pd3

In the third paragraph the partial derivative is taken with respect to $a_i$. I'm confused how this derivative is taken. I'm also confused also why $f_i$ is used when it is not part of the derivative of $x^2$. Can anyone provide guidance here?

3

There are 3 best solutions below

5
On BEST ANSWER

The variables $x_1,\cdots x_m$ are integration variables that disappear after the integration on the given volume.

So the function $E$ is a function of the variable parameters $a_i$ and can be differentiatd with respect to these variables. Using the Leibniz's rule for differentiation under the integral sign the derivative can be calculated as : $$ \frac{dE}{da_i}=\int_V \frac{\partial}{\partial a_i}F(a_i,x_j) dV $$

where $$F(a_i,x_j)=(f-(a_1f_1+a_2f_2+\cdots a_nf_n))^2 $$

so: $$ \frac{\partial F}{\partial a_1}=-2(f-(a_1f_1+a_2f_2+\cdots a_nf_n)) \cdot f_1 $$ $$ \frac{\partial F}{\partial a_2}=-2(f-(a_1f_1+a_2f_2+\cdots a_nf_n)) \cdot f_2 $$

etc....


Maybe you are confused by the notation. The situation is as for function

$F(x_1,x_2,y_1,y_2)= (f(x_1,x_2)-y_1f_1(x_1,x_2)-y_2f_2(x_1,x_2))^2$

the derivative with respect to $y_i$ ( that is your $a_i$ ) can be evaluated considering the functions $f_i$ as constants, because there are not dependent form $y_i$, so, using the chain rule we have: $$ \frac{\partial F}{\partial y_i}= $$ $$= 2(f(x_1,x_2)-y_1f_1(x_1,x_2)-y_2f_2(x_1,x_2)) \cdot \frac{\partial }{\partial y_i}(f(x_1,x_2)-y_1f_1(x_1,x_2)-y_2f_2(x_1,x_2))= $$ $$ =2(f(x_1,x_2)-y_1f_1(x_1,x_2)-y_2f_2(x_1,x_2))(-f_i(x_1,x_2)) $$

2
On

Maybe it's easier to see if we take a finite number of functions to expand upon. Let's say we take $3$ such functions $f_1, f_2, f_3$ and proceed to calculate the quadratic error as

$$ E = \int_{V}(f-(a_1f_1+a_2f_2+a_3f_3))^2dV $$

Now we want to minimize the error, and so we calculate the derivative with respect to the expansion coefficients. For the first one

$$\frac{dE}{da_1} = \frac{d}{d a_1}\int_V(f-a_1f_1-a_2f_2-a_3f_3)^2dV = \int_V\frac{\partial}{\partial a_1}(f-a_1f_1-a_2f_2-a_3f_3)^2dV$$

so we just need to evaluate the partial derivative of the quantity in parenthesis. This is just the same as calculating the derivative of composite function like

$$\frac{d}{dt}g^2(t) = \color{red}{2}\color{green}{g(t)}\color{orange}{\frac{dg}{dt}}$$

and so

$$ \frac{\partial}{\partial a_1}\overbrace{(f-a_1f_1-a_2f_2-a_3f_3)^2}^{g^2(a_1,a_2,a_3)} = \color{red}{2}\color{green}{(f-a_1f_1-a_2f_2-a_3f_3)}\color{orange}{\left[\frac{\partial}{\partial a_1}(f-a_1f_1-a_2f_2-a_3f_3)\right]} $$

We have to find the orange part which is the partial derivative wrt $a_1$ of the, no more squared, function. To make it easier I'll write it in the following manner, choosing

$$ x = a_1f_1\qquad y=a_2f_2\qquad z=a_3f_3 $$

this means that (remember that for the partial derivative, the $f_i$ are just coefficients, even though they are in practise functions)

$$ f_1\frac{\partial}{\partial x} = f_1\frac{\partial}{f_1 \partial a_1} = \frac{\partial}{\partial a_1} $$

so that we can write the orange part as

$$ \frac{\partial}{\partial a_1}(f-a_1f_1-a_2f_2-a_3f_3) = f_1\frac{\partial}{\partial x}(f-x-y-z) = -f_1 $$

In the end what we get is

$$ \frac{\partial}{\partial a_1}(f-a_1f_1-a_2f_2-a_3f_3)^2 = 2(f-a_1f_1-a_2f_2-a_3f_3)(-f_1) = -2f_1(f-a_1f_1-a_2f_2-a_3f_3) $$

You can do it by yourself for the other two coefficients and convince yourself that the result, indipendently of how many functions you expand on, the general result is given by

$$ \frac{\partial}{\partial a_i}(f-a_1f_1-a_2f_2-a_3f_3-\cdots -a_nf_n)^2 = -2f_i(f-a_1f_1-a_2f_2-a_3f_3-\cdots -a_nf_n)$$

0
On

If you differentiate

$$(p+qx+ry)^2$$ on $q$, you get $$2x(p+qx+ry).$$

Now consider $p\leftrightarrow f$, $q\leftrightarrow-a_1$, $r\leftrightarrow-a_2$, $x\leftrightarrow f_1$ and $y\leftrightarrow f_2$.