69.6.22 problem 155

Internal problem ID [18065]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 6. Linear equations of the first order. The Bernoulli equation. Exercises page 54
Problem number : 155
Date solved : Thursday, October 02, 2025 at 02:36:47 PM
CAS classification : [_linear]

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