How do you differentiate the function $f(x)=x\sin x+\cos x$?
Answer
616.5k+ views
Hint: In this question we have the addition of trigonometric terms. In the function the first term is $x\sin x$ which is a composite function therefore, we will first solve this term by using the formula of $\dfrac{d}{dx}uv=u\dfrac{dv}{dx}+v\dfrac{du}{dx}$ and then substitute it in the original function and then derivate the remaining term $\cos x$ to get the final solution.
Complete step-by-step solution:
We have the expression as:
$\Rightarrow f(x)=x\sin x+\cos x$
We have to find the derivative of the expression therefore; it can be written as:
$\Rightarrow f'(x)=\dfrac{d}{dx}\left( x\sin x+\cos x \right)$
Now since the terms are in addition, we can split the derivative as:
$\Rightarrow f'(x)=\dfrac{d}{dx}x\sin x+\dfrac{d}{dx}\cos x\to (1)$
Now consider the term $\dfrac{d}{dx}x\sin x$. Since there is no direct way to differentiate this, we will use the formula of derivative of $uv$ which is $\dfrac{d}{dx}uv=u\dfrac{dv}{dx}+v\dfrac{du}{dx}$. We will consider $u=x$ and $v=\sin x$.
On using the formula, we get:
$\Rightarrow \dfrac{d}{dx}x\sin x=x\dfrac{d}{dx}\sin x+\sin x\dfrac{dx}{dx}$
Now we know that $\dfrac{dx}{dx}=1$ and $\dfrac{d}{dx}\sin x=\cos x$, on substituting, we get:
$\Rightarrow \dfrac{d}{dx}x\sin x=x\times \cos x+\sin x\times 1$
On simplifying, we get:
$\Rightarrow \dfrac{d}{dx}x\sin x=x\cos x+\sin x$
On substituting the value in equation $(1)$, we get:
$\Rightarrow f'(x)=x\cos x+\sin x+\dfrac{d}{dx}\cos x$
Now we know that $\dfrac{d}{dx}\cos x=-\sin x$ therefore, on substituting, we get:
$\Rightarrow f'(x)=x\cos x+\sin x-\sin x$
Since the same term with opposite sign cancel each other, we can write the expression as: $\Rightarrow f'(x)=x\cos x$, which is the required solution.
Note: In this question we have used the $\dfrac{d}{dx}uv$ formula which is for two terms which are in multiplication. There also exists the formula for two terms in division which can be denoted as $\dfrac{d}{dx}\dfrac{u}{v}$ and the formula is written as $\dfrac{d}{dx}\dfrac{u}{v}=\dfrac{v\dfrac{du}{dx}-u\dfrac{dv}{dx}}{{{v}^{2}}}$. It is to be remembered that $\dfrac{d}{dx}{{x}^{n}}=n{{x}^{n-1}}$, which is the derivation of the formula of $\dfrac{dx}{dx}=1$.
Consider the term $\dfrac{dx}{dx}$ , now $x$ can be written as ${{x}^{1}}$ therefore on differentiating, we get $1\times {{x}^{1-1}}$ which means ${{x}^{0}}$. Now we know that anything raised to $0$ is $1$ therefore, $\dfrac{dx}{dx}=1$.
Complete step-by-step solution:
We have the expression as:
$\Rightarrow f(x)=x\sin x+\cos x$
We have to find the derivative of the expression therefore; it can be written as:
$\Rightarrow f'(x)=\dfrac{d}{dx}\left( x\sin x+\cos x \right)$
Now since the terms are in addition, we can split the derivative as:
$\Rightarrow f'(x)=\dfrac{d}{dx}x\sin x+\dfrac{d}{dx}\cos x\to (1)$
Now consider the term $\dfrac{d}{dx}x\sin x$. Since there is no direct way to differentiate this, we will use the formula of derivative of $uv$ which is $\dfrac{d}{dx}uv=u\dfrac{dv}{dx}+v\dfrac{du}{dx}$. We will consider $u=x$ and $v=\sin x$.
On using the formula, we get:
$\Rightarrow \dfrac{d}{dx}x\sin x=x\dfrac{d}{dx}\sin x+\sin x\dfrac{dx}{dx}$
Now we know that $\dfrac{dx}{dx}=1$ and $\dfrac{d}{dx}\sin x=\cos x$, on substituting, we get:
$\Rightarrow \dfrac{d}{dx}x\sin x=x\times \cos x+\sin x\times 1$
On simplifying, we get:
$\Rightarrow \dfrac{d}{dx}x\sin x=x\cos x+\sin x$
On substituting the value in equation $(1)$, we get:
$\Rightarrow f'(x)=x\cos x+\sin x+\dfrac{d}{dx}\cos x$
Now we know that $\dfrac{d}{dx}\cos x=-\sin x$ therefore, on substituting, we get:
$\Rightarrow f'(x)=x\cos x+\sin x-\sin x$
Since the same term with opposite sign cancel each other, we can write the expression as: $\Rightarrow f'(x)=x\cos x$, which is the required solution.
Note: In this question we have used the $\dfrac{d}{dx}uv$ formula which is for two terms which are in multiplication. There also exists the formula for two terms in division which can be denoted as $\dfrac{d}{dx}\dfrac{u}{v}$ and the formula is written as $\dfrac{d}{dx}\dfrac{u}{v}=\dfrac{v\dfrac{du}{dx}-u\dfrac{dv}{dx}}{{{v}^{2}}}$. It is to be remembered that $\dfrac{d}{dx}{{x}^{n}}=n{{x}^{n-1}}$, which is the derivation of the formula of $\dfrac{dx}{dx}=1$.
Consider the term $\dfrac{dx}{dx}$ , now $x$ can be written as ${{x}^{1}}$ therefore on differentiating, we get $1\times {{x}^{1-1}}$ which means ${{x}^{0}}$. Now we know that anything raised to $0$ is $1$ therefore, $\dfrac{dx}{dx}=1$.
Recently Updated Pages
What is BLO What is the full form of BLO class 8 social science CBSE

Explain the Treaty of Vienna of 1815 class 10 social science CBSE

10 examples of friction in our daily life

Draw a diagram of nephron and explain its structur class 11 biology CBSE

Write structures of the following compounds i 2 Chloro3methylpentane class 11 chemistry CBSE

A Paragraph on Pollution in about 100-150 Words

Trending doubts
Draw a labelled sketch of the human eye class 12 physics CBSE

Which are the Top 10 Largest Countries of the World?

Differentiate between homogeneous and heterogeneous class 12 chemistry CBSE

Draw ray diagrams each showing i myopic eye and ii class 12 physics CBSE

Which is the correct genotypic ratio of mendel dihybrid class 12 biology CBSE

What is the Full Form of PVC, PET, HDPE, LDPE, PP and PS ?

