added preconditions, fixed format.
Fixed quadratic not having squared limit in def
fixed linear to take nx+c