69.10.2 problem 233

Internal problem ID [18136]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 9. The Riccati equation. Exercises page 75
Problem number : 233
Date solved : Thursday, October 02, 2025 at 02:54:11 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

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