Question 5 Let f(x)=x2excosxf(x) = x^2 e^x \cos x (a) Compute f′(x)f'(x) using appropriate differentiation rules. (b) Factor the result where possible. Show solutionHide solution+Question 5 - Solution We are given: f(x)=x2excosxf(x) = x^2 e^x \cos x This is a product of three functions: - u(x)=x2u(x) = x^2 - v(x)=exv(x) = e^x - w(x)=cosxw(x) = \cos x Use the **product rule** for three functions: f′(x)=u′(x)v(x)w(x)+u(x)v′(x)w(x)+u(x)v(x)w′(x)f'(x) = u'(x) v(x) w(x) + u(x) v'(x) w(x) + u(x) v(x) w'(x) Compute derivatives: - u′(x)=2xu'(x) = 2x - v′(x)=exv'(x) = e^x - w′(x)=−sinxw'(x) = -\sin x Now substitute: f′(x)=2xexcosx+x2excosx−x2exsinxf'(x) = 2x e^x \cos x + x^2 e^x \cos x - x^2 e^x \sin x Factor where possible: f′(x)=ex(cosx(2x+x2)−x2sinx)f'(x) = e^x \left( \cos x (2x + x^2) - x^2 \sin x \right) Final Answer: f′(x)=ex[cosx(x2+2x)−x2sinx]\boxed{ f'(x) = e^x \left[ \cos x (x^2 + 2x) - x^2 \sin x \right] }