83.45.20 problem Ex 22 page 61

Internal problem ID [19492]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Book Solved Excercises. Chapter IV. Equations of the first order but not of the first degree
Problem number : Ex 22 page 61
Date solved : Monday, March 31, 2025 at 07:25:34 PM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

\begin{align*} \left (y^{\prime } y+n x \right )^{2}&=\left (y^{2}+n \,x^{2}\right ) \left (1+{y^{\prime }}^{2}\right ) \end{align*}

Maple. Time used: 0.118 (sec). Leaf size: 106
ode:=(diff(y(x),x)*y(x)+n*x)^2 = (y(x)^2+n*x^2)*(1+diff(y(x),x)^2); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \sqrt {-n}\, x \\ y &= -\sqrt {-n}\, x \\ y &= \operatorname {RootOf}\left (-\ln \left (x \right )-\int _{}^{\textit {\_Z}}\frac {\sqrt {\left (n -1\right ) \left (\textit {\_a}^{2}+n \right ) n}}{\left (n -1\right ) \left (\textit {\_a}^{2}+n \right )}d \textit {\_a} +c_1 \right ) x \\ y &= \operatorname {RootOf}\left (-\ln \left (x \right )+\int _{}^{\textit {\_Z}}\frac {\sqrt {\left (n -1\right ) \left (\textit {\_a}^{2}+n \right ) n}}{\left (n -1\right ) \left (\textit {\_a}^{2}+n \right )}d \textit {\_a} +c_1 \right ) x \\ \end{align*}
Mathematica. Time used: 0.326 (sec). Leaf size: 113
ode=(D[y[x],x]*y[x]+n*x)^2==(y[x]^2+n*x^2)*(1+D[y[x],x]^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{2} e^{c_1} x^{\sqrt {\frac {n-1}{n}}+1}-\frac {1}{2} e^{-c_1} n x^{1-\sqrt {\frac {n-1}{n}}} \\ y(x)\to \frac {1}{2} e^{-c_1} x^{1-\sqrt {\frac {n-1}{n}}} \left (-n x^{2 \sqrt {\frac {n-1}{n}}}+e^{2 c_1}\right ) \\ \end{align*}
Sympy. Time used: 19.879 (sec). Leaf size: 673
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq((n*x + y(x)*Derivative(y(x), x))**2 - (n*x**2 + y(x)**2)*(Derivative(y(x), x)**2 + 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \text {Solution too large to show} \]