# Double differentials and some curious problems

• Ultimâ
In summary: I'm starting to think I should post in the engineering or programming section!In summary, the conversation involves the simplification of derivatives in a Jacobian matrix for an Extended Kalman filter (EKF). The first derivative is calculated to be equal to the second derivative divided by the first derivative, and the fourth derivative is calculated using the chain rule. However, there is confusion about the context and whether or not simplification should be done after the fourth part of the first derivative.

#### Ultimâ

Hello, I'm toying around with a Jacobian that has raised some interesting problems. It's a case of differentiating rates of some variable x, with respect to itself.

First one I suspect the answer is zero, though perhaps my reasoning is a bit flawed.

1.
$$\frac{d}{d\theta}(\dot{\theta}) =\frac{d \dot{\theta}}{dt} \times \frac{dt}{d\theta} =\ddot{\theta} \times \dot{\theta}^{-1} =\ddot{\theta} / \dot{\theta} =\frac{\Delta p }{\Delta t}}/\Delta p =\Delta t \approx 0$$

The second I think you apply the total derivative rule to, but maybe not, should the angle and angle-rate be considered as two separate variables?

2.
$$\frac{d}{d\theta}(\dot{\theta}cos\theta) =\frac{dF}{d\theta} =\frac{\partial F}{\partial \dot{\theta}} \times \frac{d\theta}{dt} + \frac{\partial F}{\partial \theta} \times \ddot{\theta} =\dot{\theta}cos\theta - \ddot{\theta}\dot{\theta}sin\theta$$

Last one has me flummaxed...
3.
$$\frac{d}{d\theta}(\theta+\dot{\theta}dt)=?$$

And finally
4.
$$\frac{d}{d\dot{\theta}}(q sin\phi tan\theta + r cos\phi tan\theta) =\frac{1}{\ddot{\theta}}\times \frac{d}{dt}(q(t) sin\phi (t) tan\theta (t)+ r (t) cos\phi (t) tan\theta (t)) =?$$

Number 4 I arrive at from the chain rule (an example below):

$$\frac{dy}{d\dot{\theta}}=\frac{dy}{dt} \times \frac{dt}{d\dot{\theta}} =\frac{dy}{dt} \times \left(\frac{d\dot{\theta}}{dt}\right)^{-1} =\frac{\dot{y}}{\ddot{\theta}}$$

Could anyone confirm what I've done so far (or point out any mistakes)? Cheers.

Just to clarify, 3. slightly, the $$dt$$ is actually the sample period, so $$\dot{\theta}dt\approx \Delta\theta$$, but I'm unsure how this affects the derivative...

Also, in 2. maybe I should use the product rule, but I think the term you are using for differentiating needs to be different...

(product rule)
$$\frac{d}{dz}(xy)= x\frac{dy}{dz}+y\frac{dx}{dz}$$

Last edited:
Ultimâ said:
1.$$\frac{d}{d\theta}(\dot{\theta}) =\frac{d \dot{\theta}}{dt} \times \frac{dt}{d\theta} =\ddot{\theta} \times \dot{\theta}^{-1} =\ddot{\theta} / \dot{\theta} =\frac{\Delta p }{\Delta t}}/\Delta p =\Delta t \approx 0$$

Hi Ultimâ!

I'm confused … what are ∆p and ∆t?

And what is the context that this is a part of? Is it something like a Lagrangian, where θ and θ' are treated as independent variables, so that ∂θ'/∂θ = ∂θ/∂θ' = 0 anyway?

If not, I don't understand how you get from θ''/θ' to (∆p/∆t)/∆p.

Sorry! I just jumped into a shorthand replace with the following:
$$\frac{\Delta p }{\Delta t}}/\Delta p =\frac{\Delta \dot{\theta} }{\Delta t}}/\Delta \ddot{\theta}$$

The context is trying to create a Jacobian matrix to estimate the covariance for angular rates. I don't really want to delve into to much detail as the matrix is rather large, but in a simplified form:

$$\mathbf{x}_{k|k-1}=\mathbf{A}_k\mathbf{x}_{k-1|k-1}$$

and I need to find

$$\mathbf{J}_k=\frac{d(\mathbf{x}_{k|k-1})}{d(\mathbf{A}_k\mathbf{x}_{k-1|k-1})}$$

Thinking about 3. a bit more I believe $$1$$ would be a fairly accurate approximate.

That is
$$\frac{\Delta p }{\Delta t}}/\Delta p =\frac{\Delta \dot{\theta} }{\Delta t}}/\Delta \dot{\theta}$$

Hi Ultimâ!
Ultimâ said:
The context is trying to create a Jacobian matrix to estimate the covariance for angular rates. I don't really want to delve into to much detail …

I think you'd better delve a little, as I've really no idea what you're doing.

You seem to be trying to differentiate one element of a matrix with respect to another.

And does the J in Jk mean Jacobian, or angular momentum?

(btw, the LaTeX for ∂ is \partial … see http://www.physics.udel.edu/~dubois/lshort2e/node61.html#SECTION008100000000000000000 [Broken])

Last edited by a moderator:

$$\frac{d}{d\theta}(\dot{\theta})=\frac{d \dot{\theta}}{dt} \times \frac{dt}{d\theta}=\ddot{\theta} \times \dot{\theta}^{-1}=\ddot{\theta} / \dot{\theta}= \frac{d}{dt}\ln \dot{\theta}$$

If that total derivative is equal to zero, then it means you must have $\ln \dot{\theta} = \mbox{const}$, which means $\dot{\theta} = \mbox{const}$, which means $\theta(t) = a + bt$, which won't be the case in general. The reason it's not zero in general is that for general cases you can in principle invert $\theta(t)$ to get $t(\theta)$, and so one could then write$\ddot{\theta}(t) = \ddot{\theta}(t(\theta)) = \ddot{\theta}(\theta)$.

Last edited:
Mute said:

$$\frac{d}{d\theta}(\dot{\theta})=\frac{d \dot{\theta}}{dt} \times \frac{dt}{d\theta}=\ddot{\theta} \times \dot{\theta}^{-1}=\ddot{\theta} / \dot{\theta}= \frac{d}{dt}\ln \dot{\theta}$$

If that total derivative is equal to zero, then it means you must have $\ln \dot{\theta} = \mbox{const}$, which means $\dot{\theta} = \mbox{const}$, which means $\theta(t) = a + bt$, which won't be the case in general. The reason it's not zero in general is that for general cases you can in principle invert $\theta(t)$ to get $t(\theta)$, and so one could then write$\ddot{\theta}(t) = \ddot{\theta}(t(\theta)) = \ddot{\theta}(\theta)$.

Actually, I didn't even need to do the bit with the ln. From the very first term, if $d\dot{\theta}/d\theta$ is zero, then $\dot{\theta} = \mbox{const}$ and $\theta = a + bt$.

tiny-tim - Sorry if I didn't make things very clear, but I was just hoping people could check what I had done seemed reasonable - that is simplifying the derivatives in 1.->4. These happen to be four of the elements of J (yes it is a Jacobian) that I'm inputting as a matrix for an Extended Kalman filter (EKF) I'm working with. This simplification means having things in terms of p q r $$\phi \ \theta \ \psi$$ or their rates (values of which the EKF has available for making calculations).

I think Mute is suggesting I shouldn't simplify after the fourth part of No. 1, which do-able, though I don't actually have theta_doubledot available and would need to use $$\frac{\dot{\theta}_t - \dot{\theta}_{(t-1)}}{dt}$$ to estimate this...

Last edited:
This is a little bit guessing, but if you are playing around with jacobian then it is most probably
$$\frac{\partial \dot{\theta}}{\partial \theta} = 0$$

and the jacobian is evaluated at some point... Also you cannot always invert the function $\theta(t)$ and you don't check if $\frac{dt}{d\theta}$ is invertible...

Well since I was asked for it, here's the full problem I have (see pdf),...Anything wrong with my reasoning here for the elements I have calculated for the Jacobian?

#### Attachments

• appEJacobianTemp.pdf
88 KB · Views: 237

## 1. What are double differentials?

Double differentials are a mathematical concept used in calculus to represent the change in two variables simultaneously. They are represented by the symbol ∂²f, and are used to calculate the rate of change of a function with respect to two independent variables.

## 2. How are double differentials used in physics?

In physics, double differentials are used to calculate the acceleration of an object with respect to two variables, such as time and position. They are also used in the study of fluid dynamics, where they represent the rate of change of velocity with respect to two spatial variables.

## 3. What are some common applications of double differentials?

Double differentials are commonly used in economics to calculate marginal rates of substitution, and in engineering to determine the stability of structures under varying conditions. They are also used in optimization problems, such as finding the maximum or minimum values of a function.

## 4. What are some curious problems involving double differentials?

One curious problem involving double differentials is the brachistochrone curve, which determines the path of a ball rolling down a frictionless surface between two points in the shortest time possible. Another is the isoperimetric problem, which involves finding the shape with the largest area for a given perimeter.

## 5. How can one improve their understanding of double differentials?

To improve understanding of double differentials, one can practice using them in various problems and applications, and also study their properties and relationships with other mathematical concepts, such as partial derivatives and differential equations. Seeking guidance from a mathematics tutor or attending lectures on the topic can also be helpful.