Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • $\begingroup$ As for DSolve[], try DSolveValue[{y'[t] == -{1, 2, 3}*y[t], y[0] == {1, 2, 3}}, y[t], {t, 0, 1}]. $\endgroup$ Commented 2 days ago
  • $\begingroup$ @MichaelE2 Have you read the addendum at the bottom? {1, 2, 3}*y[t] is not same as {1, 2, 3}.y[t]. $\endgroup$ Commented 2 days ago
  • $\begingroup$ Isn't the addendum wrong? They are not numerically identical. {1, 2, 3}*y[t] is a 3x3 matrix and {{1, 0, 0}, {0, 2, 0}, {0, 0, 3}} . y[t] is a 3-vector. Right? $\endgroup$ Commented 2 days ago
  • 1
    $\begingroup$ y[t] is vector {y1, y2, y3} in both cases. How is {1, 2, 3}*y[t] 3x3 matrix when {1, 2, 3}*{y1, y2, y3} produces vector {y1, 2 y2, 3 y3}??? $\endgroup$ Commented 2 days ago
  • 4
    $\begingroup$ "How is {1, 2, 3}*y[t] 3x3 matrix..." The key point is the evaluation order. If it's y[t]={y1, y2, y3}; {1, 2, 3}*y[t] then it won't be a matrix of course, but what's discussed here is amount to Clear[y]; {1,2,3} y[t]/.y[t]->{y1,y2,y3}. (NDSolve doesn't have HoldAll, HoldFirst, etc. attribute, so something like {1, 2, 3}*y[t] won't hold, it immediately evaluates to {y[t],2y[t],3y[t]}, but NDSolve internally reverses the procedure, this is quite unusual, and that's what Michael E2 wants to talk about in this post. ) $\endgroup$ Commented 2 days ago