# Calculation confusion with partial derivative?

Posted 21 days ago
252 Views
|
2 Replies
|
1 Total Likes
|
 Hi;Please see attached notebook detailing confusion taking the partial derivative of y' with respect to y. In my way of thinking (which may be wrong) y' and y are totally different and therefore y' should be considered a constant when taking the partial derivative with respect to y.Granted this could be a case of simply me not understanding how to properly use Mathematica, but though I would run it past you experts for your advice. Thanks,Mitch Sandlin Attachments: Answer
2 Replies
Sort By:
Posted 21 days ago
 1. D[1/2 m (y'[t])^2 - m g y[t], y[t]] (* -g m *) 2. D[1/2*m *(y'[t])^2 - m *g *y[t], y'[t]] (*m Derivative[y][t]*) because: D[1/2*m *(v)^2 - m *g *x, v] /. v -> y'[t] /. x -> y[t] (*m Derivative[y][t]*) Answer
Posted 21 days ago
 It is subtle. If you write y' for the velocity, then In:= D[y', y] Out= 0 & because the internal form of y' is Derivative[y], which does contain y. My advice is either to introduce the time variable throughout D[1/2 m (y'[t])^2 - m g y[t], y'[t]] or to make a single symbol for the time derivative: D[1/2 m (yPrime)^2 - m g y, yPrime] As for the Lagrange equation, here is a way to get it: L = 1/2 m (y'[t])^2 - m g y[t]; D[L, y[t]] - D[D[L, y'[t]], t] Answer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments