Given, f(x) is differentiable at every point of domain. ∴f′(x)={
1
x2
,
x<−1
2ax,
−1<x<1
−1
x2
,
x>1.
∵f(x) is differentiable at x=1 ∴( LHD at x=1)=( RHD at x=1) ⇒f′(1)=f′(1+) ⇒2a=−1⇒a=−
1
2
As, we know that, a function is differentiable at x=a, if it is continuous at x=a. Hence, f(x) is also continuous at x=1. i.e., ( LHL at x=1)=( RHL at x=1)=f(1) ⇒a+b=1 ⇒(−
1
2
)+b=1⇒b=
3
2
Hence, a=−
1
2
,b=
3
2
Note You can also (or apply) continuity and differentiability at x=−1.