How exactly does this reordering "change the meaning of the equation"? The derivative of with respect to x is . In this case, x is c and k is . So the derivative of is or . Multiply that by the constant and the derivative is or exactly as MATLAB showed.
Sure, the way MATLAB displays u is not identical to the way you entered it, but it represents the same value.
Ah, you're thinking it's not a reordering question but a question about operator precedence. Yes, unary minus is lower in priority (at level 4) than the power operations (levels 2 and 3.) I agree, adding parentheses (level 1) can help clarify intent.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.