df/dp-Derivative of f with respect to p.. So, df/dp in this case is (p-.1*s-5*g)*x-1000*r multiplied by the coefficient of p.. df/dp=[(p-.1*s-5*g)*x-1000*r] * 1 = [(650-0.1*1500-5*3)*85-1000*7]=485*85-7000=34225

df/dx-Derivative of f with respect to x.. So, df/dx in this case is (p-.1*s-5*g)*x-1000*r multiplied by the coefficient of x.. df/dp=[(p-.1*s-5*g)*x-1000*r]*(p-.1*s-5*g)=34225*(p-.1*s-5*g)=34225*(650-0.1*1500-5*3)=34225*485=16599125