The marginal-revenue function for a manufacturer's product is of the form

for constands a and b, where r is total revenue received when q units are produced and sold.

Find the demand function, and express it in the form p = f(q)

I'm not sure where to even begin, any help is appreciated....thank you!