Symbolic Differentiation wrt time

I have such an expression;
(x(t) + y(t))^2
Where x and y are function of t How can I symbolically take the derivative of this expression with respect to t
Which has to result in 2[xx' + xy' + yx' + yy']

回答 (1 件)

Wayne King
Wayne King 2013 年 12 月 22 日

4 投票

syms t x(t) y(t)
diff((x(t)+y(t))^2)
The above gives the output:
2*(x(t) + y(t))*(diff(x(t), t) + diff(y(t), t))
which is equivalent to what you have in your post.

2 件のコメント

Mohammad
Mohammad 2014 年 4 月 1 日
hi, what about when we want to have upper degree derivatives of the same expression?
Walter Roberson
Walter Roberson 2014 年 4 月 1 日
diff((x(t)+y(t))^2,t,3) %third derivative

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

質問済み:

2013 年 12 月 22 日

コメント済み:

2014 年 4 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by