We have,
f(x)={x+p2,x≤22px+5,x>2.
Case I: p>0
Range of f(x) will be = (−∞,2]+p2=(−∞,2+p2] for all x≤2 and 2p(2,∞)+5=(4p+5,∞) for all x>2
Since, the given function f(x) is an onto function.
∴2+p2≥4p+5⇒p2−4p−3≥0⇒p≥2+√7 or p≤2−√7 (which is not possible as p > 0∴p≥2+√7>4Hence,p can take values 5, 6, 7,....., 100.Required sum for p > 0=5+6+7+....+100=5050−10=5040
Case II: p<0
Range of f(x) will be = (−∞,2]+p2=(−∞,2+p2] for all x≤2 and 2p(2,∞)+5=(−∞,4p+5) for all x>2
Function cannot take all the values in the set R and hence, will not be an onto function.
Therefore, p < 0 is not possible.
Required Sum = 5040