Solveeit Logo

Question

Question: How do you solve \(y'=-xy+\sqrt{y}\) given \(y\left( 0 \right)=1\)?...

How do you solve y=xy+yy'=-xy+\sqrt{y} given y(0)=1y\left( 0 \right)=1?

Explanation

Solution

We need to divide the given equation by y\sqrt{y} to get 1ydydx=xy+1\dfrac{1}{\sqrt{y}}\dfrac{dy}{dx}=-x\sqrt{y}+1. Then on substituting t=yt=\sqrt{y} we will obtain the equation 2dtdx+xt=12\dfrac{dt}{dx}+xt=1, which can be solved by finding the integrating factor. Finally, on substituting the solution in y=t2y={{t}^{2}}, we will obtain the solution in terms of a constant. The value of the constant can be found by using y(0)=1y\left( 0 \right)=1, which has been given in the question.

Complete step by step solution:
The differential equation given in the above question is written as
y=xy+y\Rightarrow y'=-xy+\sqrt{y}
Writing y=dydxy=\dfrac{dy}{dx} in the above equation, we get
dydx=xy+y\Rightarrow \dfrac{dy}{dx}=-xy+\sqrt{y}
Dividing by y\sqrt{y} both the sides, we get

& \Rightarrow \dfrac{1}{\sqrt{y}}\dfrac{dy}{dx}=\dfrac{1}{\sqrt{y}}\left( -xy+\sqrt{y} \right) \\\ & \Rightarrow \dfrac{1}{\sqrt{y}}\dfrac{dy}{dx}=-x\sqrt{y}+1.........\left( i \right) \\\ \end{aligned}$$ Now, let us substitute $t=\sqrt{y}$ so that $\Rightarrow t=\sqrt{y}........\left( ii \right)$ Differentiating both the sides with respect to x, we get $\Rightarrow \dfrac{dt}{dx}=\dfrac{1}{2\sqrt{y}}\dfrac{dy}{dx}$ Multiplying $$2$$ on both the sides, we get $$\begin{aligned} & \Rightarrow 2\dfrac{dt}{dx}=\dfrac{1}{\sqrt{y}}\dfrac{dy}{dx} \\\ & \Rightarrow \dfrac{1}{\sqrt{y}}\dfrac{dy}{dx}=2\dfrac{dt}{dx}......\left( iii \right) \\\ \end{aligned}$$ On substituting the equations (ii) and (iii) into the equation (i) we get $$\Rightarrow 2\dfrac{dt}{dx}=-xt+1$$ Adding $xt$ both the sides, we get $$\Rightarrow 2\dfrac{dt}{dx}+xt=1$$ Dividing the above equation by $2$ we get $$\Rightarrow \dfrac{dt}{dx}+\dfrac{x}{2}t=\dfrac{1}{2}.......\left( iv \right)$$ The integrating factor for the above differential equation can be given by $\begin{aligned} & \Rightarrow IF={{e}^{\int{\dfrac{x}{2}dx}}} \\\ & \Rightarrow IF={{e}^{\dfrac{{{x}^{2}}}{4}}} \\\ \end{aligned}$ Multiplying both the sides of (iv) by the integrating factor ${{e}^{\dfrac{{{x}^{2}}}{4}}}$, we get $$\begin{aligned} & \Rightarrow 2{{e}^{\dfrac{{{x}^{2}}}{4}}}\dfrac{dt}{dx}+{{e}^{\dfrac{{{x}^{2}}}{4}}}\left( xt \right)={{e}^{\dfrac{{{x}^{2}}}{4}}} \\\ & \Rightarrow \dfrac{d\left( t{{e}^{\dfrac{{{x}^{2}}}{4}}} \right)}{dx}={{e}^{\dfrac{{{x}^{2}}}{4}}} \\\ & \Rightarrow t{{e}^{\dfrac{{{x}^{2}}}{4}}}=\int{{{e}^{\dfrac{{{x}^{2}}}{4}}}dx}.........\left( v \right) \\\ \end{aligned}$$ Now, we know that $$\Rightarrow {{e}^{x}}=1+x+\dfrac{{{x}^{2}}}{2}+\dfrac{{{x}^{3}}}{6}+\dfrac{{{x}^{4}}}{24}+.......$$ Replacing $x$ by $\dfrac{{{x}^{2}}}{4}$ we get $$\begin{aligned} & \Rightarrow {{e}^{\dfrac{{{x}^{2}}}{4}}}=1+\dfrac{{{x}^{2}}}{4}+\dfrac{{{\left( \dfrac{{{x}^{2}}}{4} \right)}^{2}}}{2}+\dfrac{{{\left( \dfrac{{{x}^{2}}}{4} \right)}^{3}}}{6}+....... \\\ & \Rightarrow {{e}^{\dfrac{{{x}^{2}}}{4}}}=1+\dfrac{{{x}^{2}}}{4}+\dfrac{{{x}^{4}}}{32}+\dfrac{{{x}^{6}}}{384}+....... \\\ \end{aligned}$$ Substituting the above in the equation (v) we get $$\begin{aligned} & \Rightarrow t\left( {{e}^{\dfrac{{{x}^{2}}}{4}}} \right)=\int{\left( 1+\dfrac{{{x}^{2}}}{4}+\dfrac{{{x}^{4}}}{32}+\dfrac{{{x}^{6}}}{384}+....... \right)dx} \\\ & \Rightarrow t\left( {{e}^{\dfrac{{{x}^{2}}}{4}}} \right)=x+\dfrac{{{x}^{3}}}{12}+\dfrac{{{x}^{5}}}{160}+\dfrac{{{x}^{7}}}{2688}+.......+C \\\ \end{aligned}$$ Dividing both the sides by ${{e}^{\dfrac{{{x}^{2}}}{4}}}$ we get $$\Rightarrow t={{e}^{-\dfrac{{{x}^{2}}}{4}}}\left( x+\dfrac{{{x}^{3}}}{12}+\dfrac{{{x}^{5}}}{160}+\dfrac{{{x}^{7}}}{2688}+....... \right)+C{{e}^{-\dfrac{{{x}^{2}}}{4}}}........\left( vi \right)$$ Now, from the equation (ii) we have $\Rightarrow t=\sqrt{y}$ Considering $x=0$ both the sides, we get $\Rightarrow t\left( 0 \right)=\sqrt{y\left( 0 \right)}$ According to the question, we have $y\left( 0 \right)=1$. So we get $\begin{aligned} & \Rightarrow t\left( 0 \right)=\sqrt{1} \\\ & \Rightarrow t\left( 0 \right)=1.......\left( vii \right) \\\ \end{aligned}$ Substituting $x=0$ in the above equation (vi) we get $$\begin{aligned} & \Rightarrow t\left( 0 \right)={{e}^{-\dfrac{{{\left( 0 \right)}^{2}}}{4}}}\left( \left( 0 \right)+\dfrac{{{\left( 0 \right)}^{3}}}{12}+\dfrac{{{\left( 0 \right)}^{5}}}{160}+\dfrac{{{\left( 0 \right)}^{7}}}{2688}+....... \right)+C{{e}^{-\dfrac{{{\left( 0 \right)}^{2}}}{4}}} \\\ & \Rightarrow t\left( 0 \right)=C \\\ \end{aligned}$$ Substituting (vii) we get $\begin{aligned} & \Rightarrow 1=C \\\ & \Rightarrow C=1 \\\ \end{aligned}$ Substituting this in the equation (vi) we get $$\begin{aligned} & \Rightarrow t={{e}^{-\dfrac{{{x}^{2}}}{4}}}\left( x+\dfrac{{{x}^{3}}}{12}+\dfrac{{{x}^{5}}}{160}+\dfrac{{{x}^{7}}}{2688}+....... \right)+{{e}^{-\dfrac{{{x}^{2}}}{4}}} \\\ & \Rightarrow t={{e}^{-\dfrac{{{x}^{2}}}{4}}}\left( 1+x+\dfrac{{{x}^{3}}}{12}+\dfrac{{{x}^{5}}}{160}+\dfrac{{{x}^{7}}}{2688}+....... \right).........\left( vii \right) \\\ \end{aligned}$$ On squaring both the sides of equation (ii), we get $\begin{aligned} & \Rightarrow {{t}^{2}}={{\sqrt{y}}^{2}} \\\ & \Rightarrow {{t}^{2}}=y \\\ & \Rightarrow y={{t}^{2}} \\\ \end{aligned}$ Substituting equation (vii) in the above equation, we get $$\begin{aligned} & \Rightarrow y={{\left[ {{e}^{-\dfrac{{{x}^{2}}}{4}}}\left( 1+x+\dfrac{{{x}^{3}}}{12}+\dfrac{{{x}^{5}}}{160}+\dfrac{{{x}^{7}}}{2688}+....... \right) \right]}^{2}} \\\ & \Rightarrow y={{e}^{-\dfrac{{{x}^{2}}}{4}\times 2}}{{\left( 1+x+\dfrac{{{x}^{3}}}{12}+\dfrac{{{x}^{5}}}{160}+\dfrac{{{x}^{7}}}{2688}+....... \right)}^{2}} \\\ & \Rightarrow y={{e}^{-\dfrac{{{x}^{2}}}{2}}}{{\left( 1+x+\dfrac{{{x}^{3}}}{12}+\dfrac{{{x}^{5}}}{160}+\dfrac{{{x}^{7}}}{2688}+....... \right)}^{2}} \\\ \end{aligned}$$ Hence, we have finally obtained the solution of the given differential equation as $$y={{e}^{-\dfrac{{{x}^{2}}}{2}}}{{\left( 1+x+\dfrac{{{x}^{3}}}{12}+\dfrac{{{x}^{5}}}{160}+\dfrac{{{x}^{7}}}{2688}+....... \right)}^{2}}$$ **Note:** We must remember the Taylor series expansion of the functions in order to solve these types of questions. This is because the integration $$\int{{{e}^{\dfrac{{{x}^{2}}}{4}}}dx}$$ was unsolvable, and hence we obtained the solution in the form of the series. Do not forget to obtain y as a function of x from the obtained solution for t, since the original variable was y and not t.