f(x)={cosx;x≥0x+k;x<0
limx→0+f(x)=limx→0+cosx=1
limx→0−f(x)=limx→0−x+k=k
So for f(x) to be continuous k=1