The certain paperback sells for $12. Author is paid royalties of 10% on first 10,000 copies sold, 12.5% on next 5000 copies, and 17% on any additional copies. Determine the piecewise-defined function R which specifies total royalties if x copies are sold.