X=(1-p)q(-C)+(1-p)(1-q)(-C)+ pq(-k-f)+p(1-q)(r-k) 此式对p求偏导数并令