フィルターのクリア

Differentiate symbolic composite function

3 ビュー (過去 30 日間)
Carmelo
Carmelo 2014 年 6 月 3 日
コメント済み: Carmelo 2014 年 6 月 6 日
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 Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by