graphing with primary and secondary functions