2.3.29 Problem 29

2.3.29.1 Solved using first_order_ode_homog_type_D
2.3.29.2 Solved using first_order_ode_homog_type_D2
2.3.29.3 Maple
2.3.29.4 Mathematica
2.3.29.5 Sympy

Internal problem ID [10161]
Book : Own collection of miscellaneous problems
Section : section 3.0
Problem number : 29
Date solved : Monday, December 08, 2025 at 07:45:46 PM
CAS classification : [[_homogeneous, `class D`]]

2.3.29.1 Solved using first_order_ode_homog_type_D

0.604 (sec)

Entering first order ode homog type D solver

\begin{align*} y^{\prime }&=2 x^{2} \sin \left (\frac {y}{x}\right )^{2}+\frac {y}{x} \\ \end{align*}
The ode
\begin{equation} u^{\prime }\left (x \right ) = 2 x \sin \left (u \left (x \right )\right )^{2} \end{equation}
is separable as it can be written as
\begin{align*} u^{\prime }\left (x \right )&= 2 x \sin \left (u \left (x \right )\right )^{2}\\ &= f(x) g(u) \end{align*}

Where

\begin{align*} f(x) &= 2 x\\ g(u) &= \sin \left (u \right )^{2} \end{align*}

Integrating gives

\begin{align*} \int { \frac {1}{g(u)} \,du} &= \int { f(x) \,dx} \\ \int { \frac {1}{\sin \left (u \right )^{2}}\,du} &= \int { 2 x \,dx} \\ \end{align*}
\[ -\cot \left (u \left (x \right )\right )=x^{2}+c_1 \]
We now need to find the singular solutions, these are found by finding for what values \(g(u)\) is zero, since we had to divide by this above. Solving \(g(u)=0\) or
\[ \sin \left (u \right )^{2}=0 \]
for \(u \left (x \right )\) gives
\begin{align*} u \left (x \right )&=0 \end{align*}

Now we go over each such singular solution and check if it verifies the ode itself and any initial conditions given. If it does not then the singular solution will not be used.

Therefore the solutions found are

\begin{align*} -\cot \left (u \left (x \right )\right ) &= x^{2}+c_1 \\ u \left (x \right ) &= 0 \\ \end{align*}
s0Converting \(-\cot \left (u \left (x \right )\right ) = x^{2}+c_1\) back to \(y\) gives
\begin{align*} -\cot \left (\frac {y}{x}\right ) = x^{2}+c_1 \end{align*}

Converting \(u \left (x \right ) = 0\) back to \(y\) gives

\begin{align*} y = 0 \end{align*}

Solving for \(y\) gives

\begin{align*} y &= 0 \\ y &= \left (\pi -\operatorname {arccot}\left (x^{2}+c_1 \right )\right ) x \\ \end{align*}
Figure 2.207: Slope field \(y^{\prime } = 2 x^{2} \sin \left (\frac {y}{x}\right )^{2}+\frac {y}{x}\)

Summary of solutions found

\begin{align*} y &= 0 \\ y &= \left (\pi -\operatorname {arccot}\left (x^{2}+c_1 \right )\right ) x \\ \end{align*}
2.3.29.2 Solved using first_order_ode_homog_type_D2

0.182 (sec)

Entering first order ode homog type D2 solver

\begin{align*} y^{\prime }&=2 x^{2} \sin \left (\frac {y}{x}\right )^{2}+\frac {y}{x} \\ \end{align*}
Applying change of variables \(y = u \left (x \right ) x\), then the ode becomes
\begin{align*} u^{\prime }\left (x \right ) x +u \left (x \right ) = 2 x^{2} \sin \left (u \left (x \right )\right )^{2}+u \left (x \right ) \end{align*}

Which is now solved The ode

\begin{equation} u^{\prime }\left (x \right ) = 2 x \sin \left (u \left (x \right )\right )^{2} \end{equation}
is separable as it can be written as
\begin{align*} u^{\prime }\left (x \right )&= 2 x \sin \left (u \left (x \right )\right )^{2}\\ &= f(x) g(u) \end{align*}

Where

\begin{align*} f(x) &= 2 x\\ g(u) &= \sin \left (u \right )^{2} \end{align*}

Integrating gives

\begin{align*} \int { \frac {1}{g(u)} \,du} &= \int { f(x) \,dx} \\ \int { \frac {1}{\sin \left (u \right )^{2}}\,du} &= \int { 2 x \,dx} \\ \end{align*}
\[ -\cot \left (u \left (x \right )\right )=x^{2}+c_1 \]
We now need to find the singular solutions, these are found by finding for what values \(g(u)\) is zero, since we had to divide by this above. Solving \(g(u)=0\) or
\[ \sin \left (u \right )^{2}=0 \]
for \(u \left (x \right )\) gives
\begin{align*} u \left (x \right )&=0 \end{align*}

Now we go over each such singular solution and check if it verifies the ode itself and any initial conditions given. If it does not then the singular solution will not be used.

Therefore the solutions found are

\begin{align*} -\cot \left (u \left (x \right )\right ) &= x^{2}+c_1 \\ u \left (x \right ) &= 0 \\ \end{align*}
Converting \(-\cot \left (u \left (x \right )\right ) = x^{2}+c_1\) back to \(y\) gives
\begin{align*} -\cot \left (\frac {y}{x}\right ) = x^{2}+c_1 \end{align*}

Converting \(u \left (x \right ) = 0\) back to \(y\) gives

\begin{align*} y = 0 \end{align*}

Solving for \(y\) gives

\begin{align*} y &= 0 \\ y &= \left (\pi -\operatorname {arccot}\left (x^{2}+c_1 \right )\right ) x \\ \end{align*}
Figure 2.208: Slope field \(y^{\prime } = 2 x^{2} \sin \left (\frac {y}{x}\right )^{2}+\frac {y}{x}\)

Summary of solutions found

\begin{align*} y &= 0 \\ y &= \left (\pi -\operatorname {arccot}\left (x^{2}+c_1 \right )\right ) x \\ \end{align*}
2.3.29.3 Maple. Time used: 0.003 (sec). Leaf size: 18
ode:=diff(y(x),x) = 2*x^2*sin(y(x)/x)^2+y(x)/x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\frac {\pi }{2}+\arctan \left (x^{2}+2 c_1 \right )\right ) x \]

Maple trace

Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
trying inverse linear 
trying homogeneous types: 
trying homogeneous D 
<- homogeneous successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=2 x^{2} \sin \left (\frac {y \left (x \right )}{x}\right )^{2}+\frac {y \left (x \right )}{x} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=2 x^{2} \sin \left (\frac {y \left (x \right )}{x}\right )^{2}+\frac {y \left (x \right )}{x} \end {array} \]
2.3.29.4 Mathematica. Time used: 0.084 (sec). Leaf size: 35
ode=D[y[x],x]== 2*x^2 * Sin[y[x]/x]^2 + y[x]/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\frac {y(x)}{x}}\frac {1}{\cos (2 K[1])-1}dK[1]=-\frac {x^2}{2}+c_1,y(x)\right ] \]
2.3.29.5 Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x**2*sin(y(x)/x)**2 + Derivative(y(x), x) - y(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (2*x**3*sin(y(x)/x)**2 + y(x))/x cannot be solved by the factorable group method