Solveeit Logo

Question

Question: Find a formula for the nth derivative of \[f\left( x \right) = x\sin x\] ?...

Find a formula for the nth derivative of f(x)=xsinxf\left( x \right) = x\sin x ?

Explanation

Solution

In order to solve this question, we will first differentiate the given function using the product rule of differentiation i.e., ddx(uv)=uddx(v)+vddx(u)\dfrac{d}{{dx}}\left( {uv} \right) = u\dfrac{d}{{dx}}\left( v \right) + v\dfrac{d}{{dx}}\left( u \right) .After that we will differentiate again and find a few more derivatives and try to transform in the form of a given function and in the form of first derivative. Then finally generalise them to get the nth derivative.

Complete step by step answer:
The given function is
f(x)=xsinx (i)f\left( x \right) = x\sin x{\text{ }} - - - \left( i \right)
Now in order to find the nth derivative, we will find the first few derivatives. For this we shall consider 1st, 2nd, and 3rd derivatives of the given function.
Now we know that according to the product rule of differentiation
ddx(uv)=uddx(v)+vddx(u)\dfrac{d}{{dx}}\left( {uv} \right) = u\dfrac{d}{{dx}}\left( v \right) + v\dfrac{d}{{dx}}\left( u \right)
Therefore, on differentiating equation (i)\left( i \right) we get
f(1)(x)=xddx(sinx)+sinxddx(x){f^{\left( 1 \right)}}\left( x \right) = x \cdot \dfrac{d}{{dx}}\left( {\sin x} \right) + \sin x \cdot \dfrac{d}{{dx}}\left( x \right)

Therefore, on solving we get
f(1)(x)=xcosx+sinx{f^{\left( 1 \right)}}\left( x \right) = x \cdot \cos x + \sin x
Now we know cosx=sin(π2+x)\cos x = \sin \left( {\dfrac{\pi }{2} + x} \right)
f(1)(x)=sinx+xsin(π2+x) (i)\Rightarrow {f^{\left( 1 \right)}}\left( x \right) = \sin x + x \cdot \sin \left( {\dfrac{\pi }{2} + x} \right){\text{ }} - - - \left( i \right)
Now let us consider f(1)(x){f^{\left( 1 \right)}}\left( x \right) and differentiating it, we will get
f(2)(x)=ddx(xcosx)+ddx(sinx){f^{\left( 2 \right)}}\left( x \right) = \dfrac{d}{{dx}}\left( {x \cdot \cos x} \right) + \dfrac{d}{{dx}}\left( {\sin x} \right)
f(2)(x)=xddx(cosx)+cosxddx(x)+ddx(sinx)\Rightarrow {f^{\left( 2 \right)}}\left( x \right) = x \cdot \dfrac{d}{{dx}}\left( {\cos x} \right) + \cos x \cdot \dfrac{d}{{dx}}\left( x \right) + \dfrac{d}{{dx}}\left( {\sin x} \right)

Therefore, on solving we get
f(2)(x)=x(sinx)+cosx+cosx\Rightarrow {f^{\left( 2 \right)}}\left( x \right) = x \cdot \left( { - \sin x} \right) + \cos x + \cos x
After simplification, we get
f(2)(x)=2cosxxsinx\Rightarrow {f^{\left( 2 \right)}}\left( x \right) = 2\cos x - x\sin x
We know sin(π+x)=sinx\sin \left( {\pi + x} \right) = - \sin x and cosx=sin(π2+x)\cos x = \sin \left( {\dfrac{\pi }{2} + x} \right)
Therefore, we have
f(2)(x)=2sin(π2+x)+xsin(π+x)\Rightarrow {f^{\left( 2 \right)}}\left( x \right) = 2\sin \left( {\dfrac{\pi }{2} + x} \right) + x\sin \left( {\pi + x} \right)

Now we will try to write this in terms of first derivative,
Therefore, we get
f(2)(x)=2sin(π2+x)+xsin(2π2+x) (iii)\Rightarrow {f^{\left( 2 \right)}}\left( x \right) = 2\sin \left( {\dfrac{\pi }{2} + x} \right) + x\sin \left( {2 \cdot \dfrac{\pi }{2} + x} \right){\text{ }} - - - \left( {iii} \right)
Now similarly let us consider f(2)(x){f^{\left( 2 \right)}}\left( x \right) and differentiating it, we will get
f(3)(x)=ddx(2cosx)ddx(xsinx){f^{\left( 3 \right)}}\left( x \right) = \dfrac{d}{{dx}}\left( {2\cos x} \right) - \dfrac{d}{{dx}}\left( {x\sin x} \right)
f(3)(x)=ddx(2cosx)[xddx(sinx)+sinxddx(x)]\Rightarrow {f^{\left( 3 \right)}}\left( x \right) = \dfrac{d}{{dx}}\left( {2\cos x} \right) - \left[ {x \cdot \dfrac{d}{{dx}}\left( {\sin x} \right) + \sin x \cdot \dfrac{d}{{dx}}\left( x \right)} \right]

Therefore, on solving we have
f(3)(x)=2(sinx)[x(cosx)+sinx]\Rightarrow {f^{\left( 3 \right)}}\left( x \right) = 2\left( { - \sin x} \right) - \left[ {x \cdot \left( {\cos x} \right) + \sin x} \right]
After simplification, we get
f(3)(x)=3sinxxcosx \Rightarrow {f^{\left( 3 \right)}}\left( x \right) = - 3\sin x - x\cos x{\text{ }}
We know sin(π+x)=sinx\sin \left( {\pi + x} \right) = - \sin x and cosx=sin(3π2+x) - \cos x = \sin \left( {\dfrac{{3\pi }}{2} + x} \right)
Therefore, we have
f(3)(x)=3sin(π+x)+xsin(3π2+x)\Rightarrow {f^{\left( 3 \right)}}\left( x \right) = 3\sin \left( {\pi + x} \right) + x\sin \left( {\dfrac{{3\pi }}{2} + x} \right)

Now we will try to write this in terms of first derivative,
Therefore, we get
f(3)(x)=3sin(2π2+x)+xsin(3π2+x) (iii)\Rightarrow {f^{\left( 3 \right)}}\left( x \right) = 3\sin \left( {2 \cdot \dfrac{\pi }{2} + x} \right) + x\sin \left( {\dfrac{{3\pi }}{2} + x} \right){\text{ }} - - - \left( {iii} \right)
and so on….
Therefore, by observing equation (i),(ii)\left( i \right),\left( {ii} \right) and (iii)\left( {iii} \right) we get the nth derivative as,
f(n)(x)=nsin(x+(n1)π2)+xsin(x+nπ2){f^{\left( n \right)}}\left( x \right) = n\sin \left( {x + \dfrac{{\left( {n - 1} \right)\pi }}{2}} \right) + x\sin \left( {x + \dfrac{{n\pi }}{2}} \right)

Hence, the formula for the nth derivative of f(x)=xsinxf\left( x \right) = x\sin x is f(n)(x)=nsin(x+(n1)π2)+xsin(x+nπ2){f^{\left( n \right)}}\left( x \right) = n\sin \left( {x + \dfrac{{\left( {n - 1} \right)\pi }}{2}} \right) + x\sin \left( {x + \dfrac{{n\pi }}{2}} \right).

Note: In this type of questions, the key point is that we have to simplify at least 3-4 differentiation of the given function to get some kind of variation. Also note that the main key point is expressing all the derivatives in the form of a given function. In this way we can observe the similarity between the derivatives in order to find the nth derivative.