Using Leibniz' formula to show the $(2n)$th derivative of $(2x^2 + 3x +1)\sin x$ is $(-1)^n(2x^2+3x-8n^2+4n+1)\sin x+(-1)^{n+1}(8nx+6n)\cos x$ wrt $x$

215 Views Asked by At

If I let $f=f(x)=\sin x$ and $g=g(x)=2x^2+3x+1$ and $D=$ First derivative wrt $x$, $D^2=$ Second derivative wrt $x$ and $D^n=$ $nth$ derivative wrt $x$ then,

Leibniz' formula states that $\displaystyle D^n(fg)=(D^nf)g+n(D^{n-1}f)(Dg)+\frac{n(n-1)}{2!}(D^{n-2}f)(D^2g)+\cdots +f(D^ng)$

Replacing $n$ with $2n$ yields $\displaystyle D^{2n}(fg)=(D^{2n}f)g+2n(D^{2n-1}f)(Dg)+\frac{2n(2n-1)}{2!}(D^{2n-2}f)(D^2g)+.....+f(D^{2n}g)$

I know that $g=2x^2+3x+1$ and $Dg=4x+3$ and $D^2g=4$ and $D^3g=0$ etc.

Also $f=\sin x$, $Df=\cos x$, $D^2f=-\sin x$, and $D^3f=-\cos x$, $D^4f=\sin x$ and cycle repeats.

So in general $D^{2r}f=(-1)^r \sin x$ and $D^{2r+1}f=(-1)^r \cos x$.

Therefore first term is $(D^{2n}f)g=(-1)^n \sin x(2x^2+3x+1)$

Second term is $2n(D^{2n-1}f)(Dg)=2n(-1)^n \cos x(4x+3)$

Third and final term is (as all subsequent terms are zero) $\displaystyle \frac{2n(2n-1)}{2!}(D^{2n-2}f)(D^2g)=n(2n-1)(-1)^n \sin x \times 4$.

Now I can tell you that the sum of these three terms above $\ne(-1)^n(2x^2+3x-8n^2+4n+1)\sin x+(-1)^{n+1}(8nx+6n)\cos x$.

Could someone please explain to me what it is I'm doing wrong?

Thank you.

1

There are 1 best solutions below

4
On BEST ANSWER

You observed correctly that $$D^{2r+1}f=(-1)^r\cos x$$ but then you wrote $$D^{2n-1}f=(-1)^n\cos x\ ,$$ it should be $$D^{2n-1}f=(-1)^{n-1}\cos x\ .$$ There is a similar error in your third term.

To get the given answer you will also need to note that $(-1)^{n-1}=(-1)^{n+1}$.