75.4.28 problem 93

Internal problem ID [16659]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 4. Equations with variables separable and equations reducible to them. Exercises page 38
Problem number : 93
Date solved : Monday, March 31, 2025 at 03:03:53 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (\infty \right )&=\frac {10 \pi }{3} \end{align*}

Maple. Time used: 0.196 (sec). Leaf size: 23
ode:=x^2*diff(y(x),x)+cos(2*y(x)) = 1; 
ic:=y(infinity) = 10/3*Pi; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {7 \pi }{2}-\arctan \left (\frac {\sqrt {3}\, x +6}{3 x}\right ) \]
Mathematica
ode=x^2*D[y[x],x]+Cos[2*y[x]]==1; 
ic={y[Infinity]==10/3*Pi}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

{}

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), x) + cos(2*y(x)) - 1,0) 
ics = {y(oo): 10*pi/3} 
dsolve(ode,func=y(x),ics=ics)