For example,

```
u::Coordinate.
f::Depends(u).
\partial{#}::PartialDerivative.
ex:=\partial_u{u f};
product_rule(_);
unwrap(_);
```

where $\partial_u(u)=0$, there seems to be a bug here.

0 votes

Hi Eureka.

I don't thing it is a bug, just a misunderstanding of the philosophy of `cadabra`

.

According to the `unwrap`

documentation:

Derivatives will be set to zero if an object inside does not depend on it.

Hence, the command is not a computational aid... I mean, stricktly speaking you have not declare any dependence for `u`

! So the algorithm set its derivative to zero.

My advice would be to use first a substitution rule, e.g.

```
rl := \partial_{u}{u} -> 1;
ex:=\partial_u{u f};
product_rule(_)
substitute(ex, rl)
unwrap(ex);
```

or if your calculation is "simple", call the `sympy`

module:

```
from cdb.sympy.calculus import *
ex := u f;
d_ex = diff(ex);
```

**NOTE** the absence of the colon in the last assignation (it is a `python`

assignation not a `cadabra`

one).

Hope this would be useful!

Cheers, Dox.