Skip to main content
Math Jaxed and formatted
Source Link
Daniele Tampieri
  • 6.4k
  • 7
  • 30
  • 45

I know that for a 1D function, I can calculate the numerical derivative at every point, (x1,y1)$\DeclareMathOperator{\d}{d\!} (x_1,y_1)$, with dy/dx$\d y/\d x$ where dy = y2 - y0$\d y = y_2 - y_0$ and dx = x2 - x0$\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, Asay $A$, with dimensions nxn$n\times n$, with respect to another tensor, Bsay $B$, with dimensions nxn$n\times n$, will yield a 4th rank tensor of dimension nxnxnxn$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$A$ with respect to B$B$, dA/dB$\d A/\d B$, is it ok to calculate the components of dA/dB$\d A/\d B$ following the numerical differentiation formula above? iI.e. for n = 6$n = 6$, I have:

dA/dB(1,1,1,1) = (A2(1,1) - A1(1,1)) / (B2(1,1) - B1(1,1))

dA/dB(1,2,1,1) = (A2(1,2) - A1(1,2)) / (B2(1,1) - B1(1,1))

dA/dB(1,3,1,1) = (A2(1,3) - A1(1,3)) / (B2(1,1) - B1(1,1))

$$ \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 A1$A_1$ and A2$A_2$ are the tensors A$A$ at two consecutive time steps.

Thanks in advance!

I know that for a 1D function, I can calculate the numerical derivative at every point, (x1,y1), with dy/dx where dy = y2 - y0 and dx = x2 - x0. If my step size is small enough, the slope can be approximated as linear.

I know that the derivative of a tensor, A, with dimensions nxn, with another tensor, B, with dimensions nxn, will yield a 4th rank tensor of dimension nxnxnxn.

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, dA/dB, is it ok to calculate the components of dA/dB following the numerical differentiation formula above? i.e. for n = 6, I have:

dA/dB(1,1,1,1) = (A2(1,1) - A1(1,1)) / (B2(1,1) - B1(1,1))

dA/dB(1,2,1,1) = (A2(1,2) - A1(1,2)) / (B2(1,1) - B1(1,1))

dA/dB(1,3,1,1) = (A2(1,3) - A1(1,3)) / (B2(1,1) - B1(1,1))

... and so on, where A1 and A2 are the tensors A at two consecutive time steps.

Thanks in advance!

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!

added 179 characters in body
Source Link

I know that for a 1D function, I can takecalculate the numerical differentiationderivative at every point, (x1,y1), with dy/dx where dy = y2 - y1dy = y2 - y0 and dx = x2 - x1dx = x2 - x0. If my step size is small enough, the slope can be approximated as linear.

I know that the derivative of a tensor, A, with dimensions nxn, with another tensor, B, with dimensions nxn, will yield a 4th rank tensor of dimension nxnxnxn.

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, dA/dB, is it ok to calculate the components of dA/dB following the numerical differentiation formula above? i.e. for n = 6, I have:

dA/dB(1,1,1,1) = (A2(1,1) - A1(1,1)) / (B2(1,1) - B1(1,1))

dA/dB(1,2,1,1) = (A2(1,2) - A1(1,2)) / (B2(1,1) - B1(1,1))

dA/dB(1,3,1,1) = (A2(1,3) - A1(1,3)) / (B2(1,1) - B1(1,1))

dA/dB(1,1,1,1) = (A2(1,1) - A1(1,1)) / (B2(1,1) - B1(1,1))

dA/dB(1,2,1,1) = (A2(1,2) - A1(1,2)) / (B2(1,1) - B1(1,1))

dA/dB(1,3,1,1) = (A2(1,3) - A1(1,3)) / (B2(1,1) - B1(1,1))

... and so on, where A1 and A2 are the tensors A at two consecutive time steps.

Thanks in advance!

I know that for a 1D function, I can take the numerical differentiation with dy/dx where dy = y2 - y1 and dx = x2 - x1.

I know that the derivative of a tensor, A, with dimensions nxn, with another tensor, B, with dimensions nxn, will yield a 4th rank tensor of dimension nxnxnxn.

If I just want a rough estimate of the derivative of A with respect to B, dA/dB, is it ok to calculate the components of dA/dB following the numerical differentiation formula above? i.e. for n = 6, I have:

dA/dB(1,1,1,1) = (A2(1,1) - A1(1,1)) / (B2(1,1) - B1(1,1))

dA/dB(1,2,1,1) = (A2(1,2) - A1(1,2)) / (B2(1,1) - B1(1,1))

dA/dB(1,3,1,1) = (A2(1,3) - A1(1,3)) / (B2(1,1) - B1(1,1))

... and so on, where A1 and A2 are the tensors A at two consecutive time steps.

Thanks in advance!

I know that for a 1D function, I can calculate the numerical derivative at every point, (x1,y1), with dy/dx where dy = y2 - y0 and dx = x2 - x0. If my step size is small enough, the slope can be approximated as linear.

I know that the derivative of a tensor, A, with dimensions nxn, with another tensor, B, with dimensions nxn, will yield a 4th rank tensor of dimension nxnxnxn.

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, dA/dB, is it ok to calculate the components of dA/dB following the numerical differentiation formula above? i.e. for n = 6, I have:

dA/dB(1,1,1,1) = (A2(1,1) - A1(1,1)) / (B2(1,1) - B1(1,1))

dA/dB(1,2,1,1) = (A2(1,2) - A1(1,2)) / (B2(1,1) - B1(1,1))

dA/dB(1,3,1,1) = (A2(1,3) - A1(1,3)) / (B2(1,1) - B1(1,1))

... and so on, where A1 and A2 are the tensors A at two consecutive time steps.

Thanks in advance!

Source Link

Can numerical differentiation be applied to tensor derivatives?

I know that for a 1D function, I can take the numerical differentiation with dy/dx where dy = y2 - y1 and dx = x2 - x1.

I know that the derivative of a tensor, A, with dimensions nxn, with another tensor, B, with dimensions nxn, will yield a 4th rank tensor of dimension nxnxnxn.

If I just want a rough estimate of the derivative of A with respect to B, dA/dB, is it ok to calculate the components of dA/dB following the numerical differentiation formula above? i.e. for n = 6, I have:

dA/dB(1,1,1,1) = (A2(1,1) - A1(1,1)) / (B2(1,1) - B1(1,1))

dA/dB(1,2,1,1) = (A2(1,2) - A1(1,2)) / (B2(1,1) - B1(1,1))

dA/dB(1,3,1,1) = (A2(1,3) - A1(1,3)) / (B2(1,1) - B1(1,1))

... and so on, where A1 and A2 are the tensors A at two consecutive time steps.

Thanks in advance!