Solveeit Logo

Question

Question: Solve the differential equation \[\dfrac{{dy}}{{dx}} + y\cot x = 2x + {x^2}\cot x\]...

Solve the differential equation dydx+ycotx=2x+x2cotx\dfrac{{dy}}{{dx}} + y\cot x = 2x + {x^2}\cot x

Explanation

Solution

Hint: The given differential equation is a Bernoulli`s Equation of the form dydx+Py=Q\dfrac{{dy}}{{dx}} + Py = Q , which can be solved by using its Integrating factor. So, use this concept to reach the solution of the problem. For finding the integrating factor we used integration.

Complete step-by-step solution -
Given dydx+ycotx=2x+x2cotx\dfrac{{dy}}{{dx}} + y\cot x = 2x + {x^2}\cot x
This differential equation is of the form
dydx+Py=Q\dfrac{{dy}}{{dx}} + Py = Q
where P = \cot x{\text{ & }}Q = 2x + {x^2}\cot x
we know that IF=ePdxIF = {e^{\int {Pdx} }} , so for the given equation

IF=ecotxdx IF=elogx [cotxdx=log(sinx)] IF=sinx [elogx=x]  IF =sinx  \Rightarrow {\text{IF}} = {e^{\int {\cot xdx} }} \\\ \Rightarrow {\text{IF}} = {e^{\log x}}{\text{ }}\left[ {\because \int {\cot xdx = \log \left( {\sin x} \right)} } \right] \\\ \Rightarrow {\text{IF}} = \sin x{\text{ }}\left[ {\because {e^{\log x}} = x} \right] \\\ \therefore {\text{ IF }} = \sin x \\\

The solution of the differential equation of the form dydx+Py=Q\dfrac{{dy}}{{dx}} + Py = Q is given by y×IF =(Q×IF) dx+cy \times {\text{IF }} = \int {\left( {Q \times {\text{IF}}} \right)} {\text{ }}dx + c
So, for the given differential equation, the solution is

y×sinx =[(2x+x2cotx)×sinx] dx+c y×sinx =(2xsinx+x2cotxsinx)dx+c ysinx =2xsinxdx+(x2sinx×cosxsinx)dx+c ysinx=2xsinxdx+x2cosxdx+c  \Rightarrow y \times \sin x{\text{ }} = \int {\left[ {\left( {2x + {x^2}\cot x} \right) \times \sin x} \right]} {\text{ }}dx + c \\\ \Rightarrow y \times \sin x{\text{ }} = \int {\left( {2x\sin x + {x^2}\cot x\sin x} \right)dx + c} \\\ \Rightarrow y\sin x{\text{ }} = \int {2x\sin xdx} + \int {\left( {{x^2}\sin x \times \dfrac{{\cos x}}{{\sin x}}} \right)dx} + c \\\ \Rightarrow y\sin x = 2\int {x\sin xdx} + \int {{x^2}\cos xdx} + c \\\

By using the formula of integrating by parts
f(x)g(x)dx=f(x)g(x)dx(f(x)(g(x)dx))dx\int f(x)\cdot g(x) dx = f(x)\int g(x)dx - \int (f’(x) \cdot (\int g(x) dx)) dx
We have

\Rightarrow y\sin x = 2\left[ {\sin x\int {xdx - \int {\left\\{ {\dfrac{{d\left( {\sin x} \right)}}{{dx}}\int {xdx} } \right\\}dx} } } \right] + \int {{x^2}\cos xdx} + c \\\ \Rightarrow y\sin x = 2\left[ {\sin x \times \left( {\dfrac{{{x^2}}}{2}} \right) - \int {\left\\{ {\cos x \times \left( {\dfrac{{{x^2}}}{2}} \right)} \right\\}dx} } \right] + \int {{x^2}\cos xdx} + c \\\ \Rightarrow y\sin x = {x^2}\sin x - \int {{x^2}\cos xdx + \int {{x^2}\cos xdx} + c} \\\

Cancelling the common terms, we get
ysinx=x2sinx+c\Rightarrow y\sin x = {x^2}\sin x + c
Therefore, the solution of the differential equation dydx+ycotx=2x+x2cotx\dfrac{{dy}}{{dx}} + y\cot x = 2x + {x^2}\cot x is ysinx=x2sinx+cy\sin x = {x^2}\sin x + c.
Note: The integrating factor of the Bernoulli`s Equation of the form dydx+Py=Q\dfrac{{dy}}{{dx}} + Py = Q is given by IF=ePdxIF = {e^{\int {Pdx} }}. We have used Integrating by parts method to solve the differential equation.