2.30 problem 30

2.30.1 Existence and uniqueness analysis
2.30.2 Solving as homogeneous ode
2.30.3 Maple step by step solution

Internal problem ID [5778]
Internal file name [OUTPUT/5026_Sunday_June_05_2022_03_17_58_PM_95821168/index.tex]

Book: Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section: Chapter 1. First order differential equations. Section 1.2 Homogeneous equations problems. page 12
Problem number: 30.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "exact", "linear", "homogeneousTypeD2", "first_order_ode_lie_symmetry_lookup"

Maple gives the following as the ode type

[_linear]

Unable to solve or complete the solution.

\[ \boxed {y^{\prime } x -\frac {y}{2}=x} \] With initial conditions \begin {align*} [y \left (0\right ) = 0] \end {align*}

2.30.1 Existence and uniqueness analysis

This is a linear ODE. In canonical form it is written as \begin {align*} y^{\prime } + p(x)y &= q(x) \end {align*}

Where here \begin {align*} p(x) &=-\frac {1}{2 x}\\ q(x) &=1 \end {align*}

Hence the ode is \begin {align*} y^{\prime }-\frac {y}{2 x} = 1 \end {align*}

The domain of \(p(x)=-\frac {1}{2 x}\) is \[ \{x <0\boldsymbol {\lor }0

2.30.2 Solving as homogeneous ode

In canonical form, the ODE is \begin {align*} y' &= F(x,y)\\ &= \frac {2 x +y}{2 x}\tag {1} \end {align*}

An ode of the form \(y' = \frac {M(x,y)}{N(x,y)}\) is called homogeneous if the functions \(M(x,y)\) and \(N(x,y)\) are both homogeneous functions and of the same order. Recall that a function \(f(x,y)\) is homogeneous of order \(n\) if \[ f(t^n x, t^n y)= t^n f(x,y) \] In this case, it can be seen that both \(M=2 x +y\) and \(N=2 x\) are both homogeneous and of the same order \(n=1\). Therefore this is a homogeneous ode. Since this ode is homogeneous, it is converted to separable ODE using the substitution \(u=\frac {y}{x}\), or \(y=ux\). Hence \[ \frac { \mathop {\mathrm {d}y}}{\mathop {\mathrm {d}x}}= \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}}x + u \] Applying the transformation \(y=ux\) to the above ODE in (1) gives \begin {align*} \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}}x + u &= 1+\frac {u}{2}\\ \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}x}} &= \frac {1-\frac {u \left (x \right )}{2}}{x} \end {align*}

Or \[ u^{\prime }\left (x \right )-\frac {1-\frac {u \left (x \right )}{2}}{x} = 0 \] Or \[ 2 u^{\prime }\left (x \right ) x +u \left (x \right )-2 = 0 \] Which is now solved as separable in \(u \left (x \right )\). Which is now solved in \(u \left (x \right )\). In canonical form the ODE is \begin {align*} u' &= F(x,u)\\ &= f( x) g(u)\\ &= \frac {-\frac {u}{2}+1}{x} \end {align*}

Where \(f(x)=\frac {1}{x}\) and \(g(u)=-\frac {u}{2}+1\). Integrating both sides gives \begin{align*} \frac {1}{-\frac {u}{2}+1} \,du &= \frac {1}{x} \,d x \\ \int { \frac {1}{-\frac {u}{2}+1} \,du} &= \int {\frac {1}{x} \,d x} \\ -2 \ln \left (u -2\right )&=\ln \left (x \right )+c_{2} \\ \end{align*} Raising both side to exponential gives \begin {align*} \frac {1}{\left (u -2\right )^{2}} &= {\mathrm e}^{\ln \left (x \right )+c_{2}} \end {align*}

Which simplifies to \begin {align*} \frac {1}{\left (u -2\right )^{2}} &= c_{3} x \end {align*}

Which simplifies to \[ \frac {1}{\left (u \left (x \right )-2\right )^{2}} = c_{3} {\mathrm e}^{c_{2}} x \] The solution is \[ \frac {1}{\left (u \left (x \right )-2\right )^{2}} = c_{3} {\mathrm e}^{c_{2}} x \] Now \(u\) in the above solution is replaced back by \(y\) using \(u=\frac {y}{x}\) which results in the solution \[ \frac {1}{\left (\frac {y}{x}-2\right )^{2}} = c_{3} {\mathrm e}^{c_{2}} x \] Which simplifies to \begin {align*} \frac {x}{\left (2 x -y\right )^{2}} = c_{3} {\mathrm e}^{c_{2}} \end {align*}

Verification of solutions N/A

2.30.3 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime } x -\frac {y}{2}=x , y \left (0\right )=0\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=\frac {x +\frac {y}{2}}{x} \\ \bullet & {} & \textrm {Collect w.r.t.}\hspace {3pt} y\hspace {3pt}\textrm {and simplify}\hspace {3pt} \\ {} & {} & y^{\prime }=1+\frac {y}{2 x} \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE}\hspace {3pt} \\ {} & {} & y^{\prime }-\frac {y}{2 x}=1 \\ \bullet & {} & \textrm {The ODE is linear; multiply by an integrating factor}\hspace {3pt} \mu \left (x \right ) \\ {} & {} & \mu \left (x \right ) \left (y^{\prime }-\frac {y}{2 x}\right )=\mu \left (x \right ) \\ \bullet & {} & \textrm {Assume the lhs of the ODE is the total derivative}\hspace {3pt} \frac {d}{d x}\left (y \mu \left (x \right )\right ) \\ {} & {} & \mu \left (x \right ) \left (y^{\prime }-\frac {y}{2 x}\right )=y^{\prime } \mu \left (x \right )+y \mu ^{\prime }\left (x \right ) \\ \bullet & {} & \textrm {Isolate}\hspace {3pt} \mu ^{\prime }\left (x \right ) \\ {} & {} & \mu ^{\prime }\left (x \right )=-\frac {\mu \left (x \right )}{2 x} \\ \bullet & {} & \textrm {Solve to find the integrating factor}\hspace {3pt} \\ {} & {} & \mu \left (x \right )=\frac {1}{\sqrt {x}} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} x \\ {} & {} & \int \left (\frac {d}{d x}\left (y \mu \left (x \right )\right )\right )d x =\int \mu \left (x \right )d x +c_{1} \\ \bullet & {} & \textrm {Evaluate the integral on the lhs}\hspace {3pt} \\ {} & {} & y \mu \left (x \right )=\int \mu \left (x \right )d x +c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=\frac {\int \mu \left (x \right )d x +c_{1}}{\mu \left (x \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (x \right )=\frac {1}{\sqrt {x}} \\ {} & {} & y=\sqrt {x}\, \left (\int \frac {1}{\sqrt {x}}d x +c_{1} \right ) \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & y=\sqrt {x}\, \left (2 \sqrt {x}+c_{1} \right ) \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=0 \\ {} & {} & 0=0 \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =c_{1} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =c_{1} \hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & y=\sqrt {x}\, \left (2 \sqrt {x}+c_{1} \right ) \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y=\sqrt {x}\, \left (2 \sqrt {x}+c_{1} \right ) \end {array} \]

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
<- 1st order linear successful`
 

Solution by Maple

Time used: 0.047 (sec). Leaf size: 13

dsolve([x*diff(y(x),x)=x+1/2*y(x),y(0) = 0],y(x), singsol=all)
 

\[ y \left (x \right ) = 2 x +\sqrt {x}\, c_{1} \]

Solution by Mathematica

Time used: 0.046 (sec). Leaf size: 17

DSolve[{x*y'[x]==x+1/2*y[x],{y[0]==0}},y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to 2 x+c_1 \sqrt {x} \]