Your notation is wrong, hence is your confusion, perhaps it should look as (sinx)^2*(cosx):((sinx)^2*(cosx))' = ((sin x)^2)'*cos x + (sin x)^2*(cos x)' = [2sin x cos x] *cos x - (sin x)^2*sin x =2sin x cos ^2 x - (sin x)^3
Really missed something, did that stuff long ago.