23.1.55 problem 49

Internal problem ID [4662]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 49
Date solved : Tuesday, September 30, 2025 at 07:38:29 AM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }&=\cos \left (x \right )-\left (\sin \left (x \right )-y\right ) y \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 25
ode:=diff(y(x),x) = cos(x)-(sin(x)-y(x))*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {{\mathrm e}^{-\cos \left (x \right )}}{c_1 +\int {\mathrm e}^{-\cos \left (x \right )}d x}+\sin \left (x \right ) \]
Mathematica. Time used: 60.607 (sec). Leaf size: 110
ode=D[y[x],x]==Cos[x]-(Sin[x]-y[x])*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {c_1 \sin (x) \int _1^xe^{-\cos (K[1])}dK[1]+\sin (x)+c_1 \left (-e^{-\cos (x)}\right )}{1+c_1 \int _1^xe^{-\cos (K[1])}dK[1]}\\ y(x)&\to \sin (x)-\frac {\exp \left (-\int _1^x-\sin (K[1])dK[1]\right )}{\int _1^x\exp \left (-\int _1^{K[2]}-\sin (K[1])dK[1]\right )dK[2]} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-y(x) + sin(x))*y(x) - cos(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -y(x)**2 + y(x)*sin(x) - cos(x) + Derivative(y(x), x) cannot be solved by the factorable group method