Differentiate symbolic composite function

3 次查看(过去 30 天)
Hello,
I am currently using MATLAB R2013a and I am trying to differentiate an expression in order to obtain a symbolic non linear differential equation. The expression has the following form:
syms t a(t) b(t) c(t)
f=f(a(t),b(t),c(t))
where neither a(t), b(t) nor c(t) are known in their functional form, but the relation f(a(t),b(t),c(t)) is known in it's functional form. I wish to obtain:
df/da=g(a(t),b(t),c(t))
df/db=h(a(t),b(t),c(t))
df/dc=k(a(t),b(t),c(t))
I define the composite function f(a(t),b(t),c(t)), MATLAB recongnizes only a function of t f=f(t). I perform the following symbolic operations:
diff(f,a(t))
diff(f,b(t))
diff(f,c(t))
MATLAB does not recognize f as a composite function of a(t), b(t), c(t) and cannot perform the above differentiations. I cannot remove the time dependence a(t), b(t), c(t) since it will then be necessary to derive with respect to time.
Is some solution known for a problem of this type?
Thank you in advance.
Carmelo.

采纳的回答

Deepak Ramaswamy
Deepak Ramaswamy 2014-6-4
Does this work?
syms t at bt ct
f = at*bt*ct*t;
syms a(t) b(t) c(t)
dfda = subs(diff(f,at),[at,bt,ct],[a(t),b(t),c(t)])
dfa =
t*b(t)*c(t)
I probably missed why time dependence can't be removed
  1 个评论
Carmelo
Carmelo 2014-6-6
Thank you, I guess the subs function is the key. Time dependence couldn't be removed since I need to later solve the differential equation.
Best regards.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by