Opened 5 years ago
Last modified 5 years ago
#5934 new discussion
alias state in der-call — at Initial Version
Reported by: | Philip Hannebohm | Owned by: | Lennart Ochel |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Backend | Version: | |
Keywords: | Cc: | Karim Adbdelhak, Lennart Ochel, Francesco Casella |
Description
Currently arguments of the der-call like in der(sin(x)*y) = 1
are differentiated symbolically until single variables are reached, yielding something like
cos(x)*der(x)*y + sin(x)*der(y) = 1
In cases like der(y^x)
this may even result in pretty ugly residual equations.
Instead we could introduce an alias z = sin(x)*y
, s.t. der(z) = 1
. I believe Karim has some convincing arguments towards this approach. I'll try to recap them from what I understand:
- If
x
andy
appear only algebraically elsewhere, introducing an alias results in fewer states, thus a lower index. - Otherwise (
der(x)
andder(y)
exist elsewhere) the system may need index reduction anyways, because the statesx
andy
are connected somehow. The alias might allow index reduction to pick a better choice.
I personally think differentiating the interior of der(...)
is a cool feature. But there may be practical reasons against it.
I have no idea how academic this issue is. Opinions?