Deriving MR from TR

Need clarification on deriving MR from TR. Assuming TR is 400Qd-Qd^2. How come MR is 400-2Qd. Someone should help.

Differential calculus: marginal revenue is the (first) derivative to total revenue with respect to quantity.

Marginal revenue is the first derivative of the revenue function R = 400q - q^2

So d®/d(q) = 400 - 2q

If you don’t know derivatives, don’t worry because they are not tested on the exam. I think the marginal revenue functions are given.

Thanks to both of you.

My pleasure.