How to differentiate with respect to a symbolic function (which is a function of time)

6 views (last 30 days)
syms t x
Fi = sym('Fi(t)') % time dependent symbolic variable
y = sin(Fi)*x % equation
symvar(y) % gives that y is dependent on x and t but not Fi
diff(y, Fi) % gives mupad error, obviously because according to matlab Fi is not a parameter of y
Given the example above, I have a function y, which is dependent on Fi and x. I can differentiate with respect to x and t, and it gives the right results but I cannot with respect to Fi.
So my question is: if I have a function y(Fi(t)), then how can I make matlab differentiate with respect to Fi?
Thanks in advance, Tamas

Answers (1)

Walter Roberson
Walter Roberson on 26 Apr 2013
If Fi is known, then you do a change of variable if possible.
If Fi is not known, then you cannot do it.
  1 Comment
Tamas
Tamas on 26 Apr 2013
So the only workaround is to substitute Fi with an other variable and differentiate with respect to that?
I would assume that there must be an easy way to do this because in engineering it is usual that you have a variable changing in time, for example a position or speed coordinate...

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!