Incorrect substitution of multivariate derivatives
- Dominant language
- Julia
- Stars
- 282
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
```julia
using SymPy
@vars(u, w)
@symfuns(x)
dww = diff(x(u,w), (u, 1), (w, 2))(w=>0)
u0 = (
u=>0,
diff(x(u,w), (u, 2), (w, 4))(0,0)=>0,
)
diff(dww, (u, 3))(u0...)
for N in 1:6
t = diff(x(u, w), (u, N), (w, 1))
println(t, ':', t(0,0)(t(0,0)=>0))
end
```
gives the output
```julia
Derivative(x(u, w), u, w):0
Derivative(x(u, w), (u, 2), w):0
Derivative(x(u, w), (u, 3), w):0
Derivative(x(u, w), (u, 4), w):0
Derivative(x(u, w), (u, 5), w):Subs(Derivative(x(u, w), (u, 4), (w, 2)), (u, w), (0, 0))
Derivative(x(u, w), (u, 6), w):0
```
I expect them all to be 0, but for some reason the evaluation of a (u, 5), (w, 1) derivative and other multivariate derivatives of total order 6 (not shown here) do not self-substitute correctly after evaluating the line `diff(dww, (u, 3))(u0...)`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.