Symbolic Differentiation wrt time

10 vues (au cours des 30 derniers jours)
zoom
zoom le 22 Déc 2013
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']

Réponses (1)

Wayne King
Wayne King le 22 Déc 2013
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 commentaires
Mohammad
Mohammad le 1 Avr 2014
hi, what about when we want to have upper degree derivatives of the same expression?
Walter Roberson
Walter Roberson le 1 Avr 2014
diff((x(t)+y(t))^2,t,3) %third derivative

Connectez-vous pour commenter.

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by