Mupad partial time derivative
3 views (last 30 days)
Show older comments
Witold Sure
on 15 Oct 2020
Commented: Witold Sure
on 19 Oct 2020
Hi, I've been working with mupad for some time, but I'm really surprised by the recent situation:
I've been doing some time derivative, but when the expression includes higher devirative of the same variable, it suddenly equals zero, idk why.
Any ideas how to fix this?
this is what i mean:
code:
A:=q(t)
AA:=diff(A|[q(t)=s],s)|[s=q(t)]
B:=(q(t)*diff(q(t),t))
BB:=diff(B|[q(t)=s],s)|[s=q(t)]
I'd expect diff(q(t),t)) instead of 0.
0 Comments
Accepted Answer
Walter Roberson
on 16 Oct 2020
You substitute s for q(t), so B transforms into s*diff(s,t) . s is constant with respect to t so diff(s,t) is 0 and s*0 is 0 (provided that s is finite) so s*diff(s,t) is going to collapse to 0. Then you take the derivative of that 0 with respect to s, which is going to be 0.
6 Comments
Walter Roberson
on 19 Oct 2020
By the way, as of R2020b, the MATLAB interface to diff() can differentiate with respect to a function derivative.
More Answers (0)
See Also
Categories
Find more on Get Started with MuPAD in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!