ans =
You cannot just write dx, and hope that MATLAB will be smart enough to differentiate something. The mindreading toolbox is never working when you need it.
I would strongly suggest you first spend some time with the MATLAB Onramp tutororial. Then spend some time in learnign how to use the symbolic toolbox. diff can differentiate an expression.