# find the nth derivative of $x^{2}\sin^{2}\left(2x\right)$ and $\sin^{2}\left(3x\right)\cos\left(5x\right)$

Find the nth derivative of the two given functions:

$$\tag{II}x^{2}\sin^{2}\left(2x\right)$$ $$\tag{I}\sin^{2}\left(3x\right)\cos\left(5x\right)$$

For the first case I'm going to generalize the nth derivative of $$\sin^{2}\left(ax\right)$$,where $$a$$ is a real number, also I'm using the famous identity $$\cos\left(x\right)=\sin\left(x+\frac{\pi}{2}\right)$$:

consider the function $$\sin^{2}\left(ax\right)$$,the consecutive derivative of the given function are as follows:

$$\frac{d}{dx}\sin^{2}\left(ax\right)=2\sin\left(ax\right)\cos\left(ax\right)a=a\sin\left(2ax\right)$$

$$\frac{d^{2}}{dx^{2}}\sin^{2}\left(ax\right)=2a^{2}\cos\left(2ax\right)=2^{\color{red}1}a^{\color{red}2}\sin\left(2ax+\frac{\color{blue}1\pi}{2}\right)$$

$$\frac{d^{3}}{dx^{3}}\sin^{2}\left(ax\right)=2^{2}a^{3}\cos\left(2ax+\frac{\pi}{2}\right)=2^{\color{red}2}a^{\color{red}3}\sin\left(2ax+\frac{\color{blue}2\pi}{2}\right)$$

$$\frac{d^{4}}{dx^{4}}\sin^{2}\left(ax\right)=2^{{3}}a^{{4}}\cos\left(2ax+\frac{2\pi}{2}\right)=2^{\color{red}3}a^{\color{red}4}\sin\left(2ax+\frac{\color{blue}{3}\pi}{2}\right)$$

Continuing this way we can generalize the nth derivative such that: $$\frac{d^{n}}{dx^{n}}\sin^{2}\left(ax\right)=2^{\left(n-1\right)}a^{\left(n\right)}\sin\left(2ax+\frac{\left(n-1\right)\pi}{2}\right)\tag{1}$$

Using Leibniz formula we have: $$\color{green}{\left(\left(x\sin\left(2x\right)\right)^{2}\right)^{\left(n\right)}}=\sum_{k=0}^{n}{{n}\choose{k}}\left(\sin^{2}\left(2x\right)\right)^{\left(n-k\right)}\left(x^{2}\right)^{\left(k\right)}=$$$$\left(\sin^{2}\left(2x\right)\right)^{\left(n\right)}x^{2}+n\left(\sin^{2}\left(2x\right)\right)^{\left(n-1\right)}2x+n\left(n-1\right)\left(\sin^{2}\left(2x\right)\right)^{\left(n-2\right)}$$

Setting $$a=2$$ in the relation $$(1)$$ implies:

$$\color{green}{\left(\left(x\sin\left(2x\right)\right)^{2}\right)^{\left(n\right)}}=$$$$2^{\left(2n-1\right)}\sin\left(4x+\frac{\left(n-1\right)\pi}{2}\right)x^{2}+2nx\left(2^{\left(2\left(n-1\right)-1\right)}\sin\left(4x+\frac{\left(n-2\right)\pi}{2}\right)\right)+n\left(n-1\right)\left(2^{\left(2\left(n-2\right)-1\right)}\sin\left(4x+\frac{\left(n-3\right)\pi}{2}\right)\right)$$

but the formula is just true for $$n\ge3$$, although the formula $$(1)$$ is true for all $$n\ge1$$, I cannot find the problem and still don't know why this error appears,also can soneone explain why my generalized formula is not true for $$n=0$$? $$.......................................................................................$$

About the second case using the well-known following formula and also using the the relation $$(1)$$ in the previous case (setting $$a=3$$) we have:

$$\color{blue}{\frac{d^{n}}{dx^{n}}\cos\left(ax\right)=a^{n}\cos\left(ax+\frac{n\pi}{2}\right)}$$ $$\color{green}{\left(\sin^{2}\left(3x\right)\cos\left(5x\right)\right)^{\left(n\right)}}=\sum_{k=0}^{n}{{n}\choose{k}}\left(2^{\left(k-1\right)}3^{k}\sin\left(\frac{\left(k-1\right)\pi}{2}+6x\right)\right)\left(5^{\left(n-k\right)}\cos\left(5x+\frac{\left(n-k\right)\pi}{2}\right)\right)$$ but the formula does not work, and I don't know why.

For the first use $$\cos2A=1-2\sin^2A$$

For the second use Werner Formulas

$$2\cos6x\cos5x=\cos x+\cos11x$$

• thanks,but can you tell me why my formula for the first case in just true for $n$ greater than or equals to $3$? – Absurd Nov 29 '19 at 12:18
• @Absurd, for $$\dfrac{d^n(x^2)}{dx^n}=0$$ for $n\ge3$ – lab bhattacharjee Nov 29 '19 at 12:21
• I know that,but I expect for $n=1,2$ to have the same result for the derivative of the function itself and also my formula,but it's not until we have some $n$ natural greater than $2$. – Absurd Nov 29 '19 at 12:28

The first function is $$\frac 1 2 x^{2}(1-\cos (4x))$$.

For the second function use : $$\sin ^{2} (3x)\cos(5x)=\frac 1 2 (1-\cos (6x)) \cos (5x)=\frac 1 2[ \cos (5x)-\frac 1 2 \cos x -\frac 1 2\cos (11x)]$$.

• thanks,I could use your explanation for the second one,but can you tell me why my formula for the first given function is true just for any natural number $n$ greater than$3$? – Absurd Nov 29 '19 at 13:59