If I have some calculation $X=v\cdot\delta$ and I want to calculate $\frac{\partial}{\partial v}X$, the result according to Mathematica is $\delta$. Now, I want to define $\delta$ as a function of $v$ but without defining the exact formula because I do not have that as a whole but numerically. Thus, I want the result to be $$\frac{\partial}{\partial v}X=\delta+v\frac{\partial \delta}{\partial v}$$ which is just the application of the product formula for derivatives. How to set some kind of a "flag" or "marker" to prevent Mathematica from deriving $\delta$ after $v$ and saying that the result is always $0$ because the variables are named differently?
1 Answer
You can use Dt
:
Dt[v δ, v]
δ + v Dt[δ, v]
Or D
with the option NonConstants
:
D[v δ, v, NonConstants -> {δ}]
δ + v D[δ, v, NonConstants -> {δ}]
D[v δ[v], v]
? $\endgroup$