We have, f(x)=int[cos3x-tan(x/2)+2cot(x/3)]dx.
Recall :
intg(x)dx=G(x)+c rArr intg(ax+b)dx=1/aG(ax+b)+c',
where, a!=0.
E.g., intcosxdx=sinx+c_1 rArr intcos3xdx=1/3sin3x+c_1'.
Hence, f(x)=intcos3xdx-inttan(x/2)dx+2intcot(x/3)dx,
=1/3sin3x-1/(1/2)ln|sec(x/2)|+2*1/(1/3)ln|sin(x/3)|+C.
:. f(x)=1/3sin3x+2ln|cos(x/2)|+6ln|sin(x/3)|+C.
But, given that, f(pi/2)=-4, we have,
1/3sin(3*pi/2)+2ln|cos((pi/2)/2)|+6ln|sin((pi/2)/3)|+C=-4.
:. 1/3(-1)+2ln|1/sqrt2|+6ln|1/2|+C=-4.
:. -1/3+ln((1/sqrt2)^2)+ln((1/2)^6))+C=-4.
:. -1/3+(ln1-ln2)+(ln1-6ln2)+C=-4.
:. C=-4+1/3+7ln2=7ln2-11/3.
Finally, f(x)=1/3sin3x+2ln|cos(x/2)|+6ln|sin(x/3)|+7ln2-11/3.
Feel the Joy of Maths.!