Possible Duplicate:
General::ivar is not a valid variable when plotting - what actually causes this and how to avoid it?
Beginner question:
Why can't I use D[] like that?
Plot[{Sin[x], D[Sin[x], x]}, {x, -2 Pi, 2 Pi}]
If I assign the result of D[] to a variable and put that variable in the list it works.


Plot[{Sin[x], Sin'[x]}, {x, -2 Pi, 2 Pi}]? For any function of typef[x]you can usef'[x]in place of theD[f[x],x]. – PlatoManiac Apr 05 '12 at 13:22