f(x)<0 Case I x+a<0 and x<0⇒x<−a Case II |x−1|<0 and x≥0⇒ Not possible f(x)≥0 Case I x+a≥0 and x<0⇒x∈[−a,0) Case II |x−1|≥0 and x≥0⇒x≥0
g[f(x)]={
x+a+1
x<−a
(x+a−1)2+b
−a≤x<0
(|x−1|−1)2+b
x≥0.
This is continuous function. Since, g[f(x)] is continuous for all x∈R So, g(f(x)) will be continuous at x=−a and x=0 Now, at x=−a LHL=RHL= value of function ⇒1=1+b=1+b⇒b=0 At x=0 LHL=RHL= value of function ⇒(a−1)2+b=b ⇒(a−1)2=0 ⇒a=1 Hence, a+b=1