60.2.329 problem 907

Internal problem ID [10903]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, Additional non-linear first order
Problem number : 907
Date solved : Sunday, March 30, 2025 at 07:21:28 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

\begin{align*} y^{\prime }&=\frac {-2 \cos \left (x \right ) x +2 \sin \left (x \right ) x^{2}+2 x +2 y^{2}+4 y \cos \left (x \right ) x -4 x y+x^{2} \cos \left (2 x \right )+3 x^{2}-4 x^{2} \cos \left (x \right )}{2 x} \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 20
ode:=diff(y(x),x) = 1/2*(-2*cos(x)*x+2*sin(x)*x^2+2*x+2*y(x)^2+4*y(x)*cos(x)*x-4*x*y(x)+x^2*cos(2*x)+3*x^2-4*x^2*cos(x))/x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\left (-1+\cos \left (x \right )\right ) x +\frac {1}{c_1 -\ln \left (x \right )} \]
Mathematica. Time used: 0.425 (sec). Leaf size: 32
ode=D[y[x],x] == (x + (3*x^2)/2 - x*Cos[x] - 2*x^2*Cos[x] + (x^2*Cos[2*x])/2 + x^2*Sin[x] - 2*x*y[x] + 2*x*Cos[x]*y[x] + y[x]^2)/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to x+x (-\cos (x))+\frac {1}{-\log (x)+c_1} \\ y(x)\to x-x \cos (x) \\ \end{align*}
Sympy. Time used: 7.638 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (2*x**2*sin(x) - 4*x**2*cos(x) + x**2*cos(2*x) + 3*x**2 + 4*x*y(x)*cos(x) - 4*x*y(x) - 2*x*cos(x) + 2*x + 2*y(x)**2)/(2*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {- C_{1} x \cos {\left (x \right )} + C_{1} x - x \log {\left (x \right )} \cos {\left (x \right )} + x \log {\left (x \right )} - 1}{C_{1} + \log {\left (x \right )}} \]