The value of 'a' for which the function f(x) = a sin x + 13 sin 3x has an extremum at x = π3 is
a cosx + 13 × 3 cos3x = 0 for x= π3
a 12 + (-1) = 0
a=2
The maximum value of the function f(x)=−|x+1|+3 is