Solveeit Logo

Question

Question: Find the solution for the given differential equation \(x\cos x\left( \dfrac{dy}{dx} \right)+y\left(...

Find the solution for the given differential equation xcosx(dydx)+y(xsinx+cosx)=1x\cos x\left( \dfrac{dy}{dx} \right)+y\left( -x\sin x+\cos x \right)=1?
(a) xy=(x+c)secxxy=\left( x+c \right)\sec x,
(b) y=x+cxcosxy=\dfrac{x+c}{x\cos x},
(c) xy+sinx+ccosx=0xy+\sin x+\operatorname{c}\cos x=0,
(d) None of these.

Explanation

Solution

We start solving the problem by dividing the given differential equation with xcosxx\cos x on both sides. We can then see that the given form of differential equation resembles the form of linear differential equation. We then find the integrating factor for the differential equation. We then use this in the general form of the solution of linear differential equation yeP(x)dx=(Q(x)eP(x)dx)dx+Cy{{e}^{\int{P\left( x \right)dx}}}=\int{\left( Q\left( x \right){{e}^{\int{P\left( x \right)dx}}} \right)dx}+C and make necessary arrangements to get the required solutions.

Complete step-by-step answer:
According to the problem, we need to find the solution for the given differential equation xcosx(dydx)+y(xsinx+cosx)=1x\cos x\left( \dfrac{dy}{dx} \right)+y\left( -x\sin x+\cos x \right)=1.
So, we have xcosx(dydx)+y(xsinx+cosx)=1x\cos x\left( \dfrac{dy}{dx} \right)+y\left( -x\sin x+\cos x \right)=1.
Let us divide both sides with xcosxx\cos x.
xcosx(dydx)+y(xsinx+cosx)xcosx=1xcosx\Rightarrow \dfrac{x\cos x\left( \dfrac{dy}{dx} \right)+y\left( -x\sin x+\cos x \right)}{x\cos x}=\dfrac{1}{x\cos x}.
xcosxxcosx(dydx)+y(xsinx+cosx)xcosx=1xcosx\Rightarrow \dfrac{x\cos x}{x\cos x}\left( \dfrac{dy}{dx} \right)+\dfrac{y\left( -x\sin x+\cos x \right)}{x\cos x}=\dfrac{1}{x\cos x}.
dydx+(xsinx+cosxxcosx)y=1xcosx\Rightarrow \dfrac{dy}{dx}+\left( \dfrac{-x\sin x+\cos x}{x\cos x} \right)y=\dfrac{1}{x\cos x} ---(1).
The differential equation in the equation (1) resembles the general form of the linear differential equation dydx+P(x).y=Q(x)\dfrac{dy}{dx}+P\left( x \right).y=Q\left( x \right). We know that the general solution for the linear differential equation is yeP(x)dx=(Q(x)eP(x)dx)dx+Cy{{e}^{\int{P\left( x \right)dx}}}=\int{\left( Q\left( x \right){{e}^{\int{P\left( x \right)dx}}} \right)dx}+C ---(2).
From equation (1) we have P(x)=(xsinx+cosx)xcosxP\left( x \right)=\dfrac{\left( -x\sin x+\cos x \right)}{x\cos x} and Q(x)=1xcosxQ\left( x \right)=\dfrac{1}{x\cos x}.
Let us first find P(x)dx\int{P\left( x \right)dx}.
So, we have P(x)dx=(xsinx+cosxxcosx)dx\int{P\left( x \right)dx}=\int{\left( \dfrac{-x\sin x+\cos x}{x\cos x} \right)dx} ---(3).
Let us assume xcosx=tx\cos x=t ---(4). Let us differentiate on both sides.
d(xcosx)=d(t)\Rightarrow d\left( x\cos x \right)=d\left( t \right).
We know that d(uv)=udv+vdud\left( uv \right)=udv+vdu.
xd(cosx)+cosxd(x)=dt\Rightarrow xd\left( \cos x \right)+\cos xd\left( x \right)=dt.
We know that d(cosx)=sinxdxd\left( \cos x \right)=-\sin xdx.
x(sinxdx)+cosxdx=dt\Rightarrow x\left( -\sin xdx \right)+\cos xdx=dt.
xsinxdx+cosxdx=dt\Rightarrow -x\sin xdx+\cos xdx=dt.
(xsinx+cosx)dx=dt\Rightarrow \left( -x\sin x+\cos x \right)dx=dt ---(5).
Let us substitute equations (4) and (5) in equation (3).
P(x)dx=dtt\Rightarrow \int{P\left( x \right)dx}=\int{\dfrac{dt}{t}}.
We know that dxx=lnx+C\int{\dfrac{dx}{x}=\ln x+C}.
P(x)dx=lnt\Rightarrow \int{P\left( x \right)dx}=\ln t. We don’t add integration constant while calculating Integrating factor.
From equation (4), we have t=xcosxt=x\cos x.
P(x)dx=ln(xcosx)\Rightarrow \int{P\left( x \right)dx}=\ln \left( x\cos x \right)---(6).
Now, we use equation (6) in equation (2) to solve for the solution of the differential equation.
ye(ln(xcosx))=((1xcosx)e(ln(xcosx)))dx+C\Rightarrow y{{e}^{\left( \ln \left( x\cos x \right) \right)}}=\int{\left( \left( \dfrac{1}{x\cos x} \right){{e}^{\left( \ln \left( x\cos x \right) \right)}} \right)dx}+C.
We know that elna=a{{e}^{\ln a}}=a.
y(xcosx)=((1xcosx)×(xcosx))dx+C\Rightarrow y\left( x\cos x \right)=\int{\left( \left( \dfrac{1}{x\cos x} \right)\times \left( x\cos x \right) \right)dx}+C.
y(xcosx)=1dx+C\Rightarrow y\left( x\cos x \right)=\int{1dx}+C.
We know that adx=ax+C\int{adx}=ax+C.
xycosx=x+C\Rightarrow xy\cos x=x+C.
y=x+Cxcosx\Rightarrow y=\dfrac{x+C}{x\cos x}---(7).
xy=(x+C)secx\Rightarrow xy=\left( x+C \right)\sec x---(8).
From equations (7) and (8), we have found the solution for the differential equation as y=x+Cxcosxy=\dfrac{x+C}{x\cos x} or xy=(x+C)secxxy=\left( x+C \right)\sec x.

So, the correct answer is “Option A and B”.

Note: We should confuse with the formulas of Integration while solving this problem. We should avoid calculation mistakes while solving this problem. We can also solve this problem by applying d(xcosx)=xsinxdx+cosxdxd\left( x\cos x \right)=-x\sin xdx+\cos xdx at the start and then using xysinx+ycosx-xy\sin x+y\cos xto complete the rest of the problem. This problem contains multiple correct options, so we need to be careful while answering.