I was going through a proof of the Breeden-Litzenberger formula and I was stuck on one of the intermediate steps.
The pdf for the prices of the underlying at expiry is defined as $f(x)$ and $S_T$ is the price of the underlying at expiry and $K$ is the strike price so the probability that the underlying expires at a price higher than the strike is:
Moreover, the fair value of the option is the expected payout of the option at expiry, discounted by the risk-free rate till expiry, or mathematically as
So now, if I want to calculate the fair value of the option,
Now, if I differentiate the call option value with respect to the strike, how do I arrive at this answer shown below and how does $(x-K)$ just disappear?