1
$\begingroup$

I know that for a 1D function, I can calculate the numerical derivative at every point, $\DeclareMathOperator{\d}{d\!} (x_1,y_1)$, with $\d y/\d x$ where $\d y = y_2 - y_0$ and $\d x = x_2 - x_0$. If my step size is small enough, the slope can be approximated as linear.

I know that the derivative of a tensor, say $A$, with dimensions $n\times n$, with respect to another tensor, say $B$, with dimensions $n\times n$, will yield a 4th rank tensor of dimension $n\times n\times n\times n$.

The question is on extending the linear approximation to tensor:

If I just want a rough estimate of the derivative of $A$ with respect to $B$, $\d A/\d B$, is it ok to calculate the components of $\d A/\d B$ following the numerical differentiation formula above? I.e. for $n = 6$, I have: $$ \begin{matrix} \dfrac{\d A}{\d B}(1,1,1,1) = \dfrac{A_2(1,1) - A_1(1,1)}{B_2(1,1) - B_1(1,1)}\\ \dfrac{\d A}{\d B}(1,2,1,1) = \dfrac{A_2(1,2) - A_1(1,2)}{B_2(1,1) - B_1(1,1)}\\ \dfrac{\d A}{\d B}(1,3,1,1) = \dfrac{A_2(1,3) - A_1(1,3)}{B_2(1,1) - B_1(1,1)} \end{matrix} $$ ... and so on, where $A_1$ and $A_2$ are the tensors $A$ at two consecutive time steps.

Thanks in advance!

$\endgroup$
10
  • $\begingroup$ what does this mean: "dy/dx where dy = y2 - y1 and dx = x2 - x1" ? the discretization of the derivative $dy/dx$ of the function $y(x)$ is $(1/2)[y(x+1)-y(x-1)]$ $\endgroup$ Commented Apr 22 at 6:01
  • $\begingroup$ @CarloBeenakker you are correct. What I was thinking is if my step size is small, every point in the derivative can be approximated as linear, so I am simply calculating a linear slope with that. $\endgroup$
    – Jesse Feng
    Commented Apr 22 at 13:22
  • $\begingroup$ In any case, my question is mainly whether if it can be extended to a tensor like that $\endgroup$
    – Jesse Feng
    Commented Apr 22 at 13:29
  • $\begingroup$ a tensor is just an array of functions, I really do not understand the question. $\endgroup$ Commented Apr 22 at 13:52
  • $\begingroup$ It sounds like you agree that the derivative tensor components can indeed be extended from a simple y = f(x) case since it is just an array of functions? $\endgroup$
    – Jesse Feng
    Commented Apr 22 at 14:03

0

You must log in to answer this question.

Browse other questions tagged .