8.21 problem 21

Internal problem ID [4376]

Book: Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section: Chapter 8, Ordinary differential equations. Section 13. Miscellaneous problems. page 466
Problem number: 21.
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [_separable]

Solve \begin {gather*} \boxed {y^{\prime }+x y-\frac {x}{y}=0} \end {gather*}

Solution by Maple

Time used: 0.012 (sec). Leaf size: 33

dsolve(diff(y(x),x)+x*y(x)=x/y(x),y(x), singsol=all)
 

\begin{align*} y \relax (x ) = \sqrt {{\mathrm e}^{-x^{2}} c_{1}+1} \\ y \relax (x ) = -\sqrt {{\mathrm e}^{-x^{2}} c_{1}+1} \\ \end{align*}

Solution by Mathematica

Time used: 0.303 (sec). Leaf size: 57

DSolve[y'[x]+x*y[x]==x/y[x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to -\sqrt {1+e^{-x^2+2 c_1}} \\ y(x)\to \sqrt {1+e^{-x^2+2 c_1}} \\ y(x)\to -1 \\ y(x)\to 1 \\ \end{align*}