We have,
f(x)=sin2x+sin2(x+π3)+cosxcos(x+π3) and g(54)=1
The composite function g(f(x)) is defined if and only if Range of f(x) ∩ Domain of g(x) is not an empty set, ϕ.
Domain of g(x) is 54, as given in the question.
Now, lets find the range of the f(x) by simplifying the function.
f(x)=[sin2x+sin2(x+π3)+cosxcos(x+π3)]
⇒f(x)=12[2sinx+2sin2(x+π3)+2cosxcos(x+π3)]
⇒f(x)=12[1−cos2x+1−cos(2x+2π3)+cosπ3+cos(2x+π3)]
⇒f(x)=12[1+1+12−cos2x−cos(2x+2π3)+cos(2x+π3)]
⇒f(x)=12[52−{cos2x+cos(2x+2π3)}+cos(2x+π3)]
⇒f(x)=12[52−2cos(2x+π3)cosπ3+cos(2x+π3)]
⇒f(x)=12[52−cos(2x+π3)+cos(2x+π3)]
⇒f(x)=12×52
⇒f(x)=54
Therefore, f(x)=54 for all x∈R
Hence, range fo f(x) is 54.
We can see that Range of f(x) ∩ Domain of g(x) is 54 and not an empty set or ϕ. So, the composite function g(f(x)) exists.
Therefore, gof(x)=g(f(x))=g(54)=1 for all x∈R and it is a constant function.