Let us first differentiate #g(x)=sin^2(sqrt(3x/(x-1)^2))#
let us write this as chain, where #g(x)=sin^2(h(x))#, #h(x)=sqrt(p(x))#,
#p(x)=(3x)/(x-1)^2# and using chain rule
#(dg(x))/(dx)=(dg)/(dh)xx(dh)/(dp)xx(dp)/(dx)#
= #2sin(h(x))cos(h(x))xx1/(2sqrt(p(x)))xx(3(x-1)^2-6x(x-1))/(x-1)^4#
= #sin(2h(x))xx1/(2sqrt(p(x)))xx(3x^2-6x+3-6x^2+6x)/(x-1)^4#
= #sin(sqrt((12x)/(x-1)^2))xx1/(2sqrt((3x)/(x-1)^2))xx(-3x^2+3)/(x-1)^4#
= #-3sin(sqrt((12x)/(x-1)^2))xx1/(2sqrt(3x))xx(x^2-1)/(x-1)^3#
= #-sqrt3/(2sqrtx)sin(sqrt((12x)/(x-1)^2))((x+1))/(x-1)^2#
and hence
#(df)/(dx)=-sqrt3/(2sqrtx)sin(sqrt((12x)/(x-1)^2))((x+1))/(x-1)^2*cos2x-sin^2(sqrt(3x/(x-1)^2))sin2x#