Answer
$$
f(x)=x^{n} \sin x
$$
we can find
$$
f^{\prime}(x)=x^{n} \cos x+n x^{n-1} \sin x
$$
If $ n=1 $ then we have:
$$
f^{\prime}(x)=x \cos x+\sin x
$$
If $ n=2 $ then we have:
$$
f^{\prime}(x)=x^{2} \cos x+2 \sin x
$$
If $ n=3 $ then we have:
$$
f^{\prime}(x)=x^{4} \cos x+3 x^{2} \sin x
$$
If $ n=4 $ then we have:
$$
f^{\prime}(x)=x^{4} \cos x+4 x^{3} \sin x
$$
For general n,
$$
f^{\prime}(x)=x^{n} \cos x+n x^{n-1} \sin x
$$
Work Step by Step
$$
f(x)=x^{n} \sin x
$$
we can find
$$
f^{\prime}(x)=x^{n} \cos x+n x^{n-1} \sin x
$$
If $ n=1 $ then we have:
$$
f^{\prime}(x)=x \cos x+\sin x
$$
If $ n=2 $ then we have:
$$
f^{\prime}(x)=x^{2} \cos x+2 \sin x
$$
If $ n=3 $ then we have:
$$
f^{\prime}(x)=x^{4} \cos x+3 x^{2} \sin x
$$
If $ n=4 $ then we have:
$$
f^{\prime}(x)=x^{4} \cos x+4 x^{3} \sin x
$$
For general n, a general rule for $ f^{\prime}(x)$ in terms of n is
$$
f^{\prime}(x)=x^{n} \cos x+n x^{n-1} \sin x
$$