f(x) is continuous at x=0
⇒L.H.L of f(x) at x=0=R.H.L of f(x) at x=0=f(0)
limx→0−f(x)=limx→0+f(x)=f(0) .........(1)
Now,limx→0−f(x)=limx→0asinπ2(x+1)
∵f(x)=asinπ2(x+1) if x≤0
=limx→0asin(π2+π2x)
=limx→0acosπ2x=acos0=a
limx→0+f(x)=limx→0+tanx−sinxx3
∵f(x)=tanx−sinxx3 if x>0
=limx→0sinxcosx−sinxx3
=limx→0sinx−sinxcosxcosx.x3
=limx→01cosxlimx→0sinxxlimx→01−cosxx2
=limx→01×1×limx→02sin2x2x24×4
=limx→01×1×12=12
Also,f(0)=asinπ2(0+1)=asinπ2=a
Putting above values in (1) we get,a=12