It's my understanding the partial derivative can take the following form:
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:

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?


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)) $$