Questions tagged [differentiation]
The differentiation tag has no usage guidance.
12 questions
3
votes
2
answers
1k
views
compute accurate derivatives using FFT
I'm trying to learn how to compute accurate derivatives using the FFT. In the code at the end of this question I'm trying to compute derivatives of
$$
f(x) = \exp(-10(x-1)^2) ,\, \, x \in [0,2]
$$
...
0
votes
2
answers
2k
views
When can I use finite differences for differentiation?
Finite differences are usually used to integrate ODE's and PDE's. However, sometimes they can be used for differentiation which I illustrated simply by using the Matlab code below to differentiate the ...
1
vote
1
answer
103
views
Automatic differentiation (AD) of a loss function which maps unitary matrix onto number
Is it possible to estimate whether automatic differentiation (AD) techniques could enable a more efficient way to repeatedly compute the derivative $\delta L / \delta u^*_{ij}$ of a specific loss ...
3
votes
2
answers
993
views
How to compute the Hessian using auto differentiation?
Assume that $f$ is defined as a composition of functions:
$$f=f_2 \circ f_1$$
where $f_1:\mathbb{R}^n \rightarrow \mathbb{R}^{m_1}$ and $f_2:\mathbb{R}^{m_1} \rightarrow \mathbb{R}^n$. We can compute ...
-2
votes
1
answer
41
views
Handling variables multiple times in Reverse-Mode Automatic Differentiation
If I try to derive a function computationally with Reverse-Mode Auto-Diff, I can derive a single function wrt. many variables in a single go.
My Issue is now, what happens, if I input this function (...
0
votes
1
answer
311
views
Compute numerical derivative for first and last points
Considering a centered finite difference approximation for the derivative, what is a reasonable approximation for the first and last points?
2
votes
3
answers
317
views
Calculating the antiderivative numerically
In the standard literature topics like numerical differentiation and numerical integration are usually discussed in detail. However, numerical integration is not the same as calculating the (true) ...
2
votes
0
answers
158
views
How to derive the adjoint sensitivity equations for a least squares objective function gradient
The Problem
I would like to determine the gradient of a least squares objective function which depends on a vector of 40 parameters $p$, and the solution of a system of 32 differential equations. In ...
-1
votes
1
answer
169
views
Finding derivative of Matrix at different grid points using Finite difference methods/ Cholesky Factorization
I want to code this problem in MATLAB. It would be a huge help if someone can suggest to me how I can approach it.
I need to solve the below-highlighted equation, I need ...
7
votes
2
answers
16k
views
Solving coupled differential equations in Python, 2nd order
I have a system of coupled differential equations, one of which is second-order. I am looking for a way to solve them in Python. I would be extremely grateful for any advice on how can I do that!
$k$...
13
votes
4
answers
1k
views
Example where autodiff works but symbolic differentiation will not?
According to the survey paper on autodiff (linked) Autodiff works on inputs that cannot be specified in closed form but can be described by a sequence of code, each component of which is ...
1
vote
0
answers
234
views
How to get the derivatives of the determinant and inverse of 2nd-order tensor wrt itself in SymPy?
I have a second-order tensor for which I need to compute the derivatives of its determinant and inverse w.r.t. itself. The equations are as follows:
$$\frac{\partial \, det(\mathbf{F})}{\partial F_{...