I am asked to find the derivative of $$e^y\cos^2y$$ with respect to $x$.
I think it is $$y'e^y\cdot2y'\cos y \sin y$$ Since there is no $x$ and $y$ term, such as $xy$, the product rule does not apply(?). However the answer I get from WolframAlpha is $$e^yy'(\cos^2y-\sin2y)$$ which looks like the product rule is used. I haven't found any questions like this online, so maybe it cannot be done and WolframAlpha is interpreting it as something else.
My question is: should I use the product rule or chain rule for questions with the product of two functions of $y$?