75.6.35 problem 168

Internal problem ID [16720]
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 : 168
Date solved : Monday, March 31, 2025 at 03:07:49 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(y)]`]]

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

Maple. Time used: 0.004 (sec). Leaf size: 17
ode:=diff(y(x),x)*cos(y(x))+sin(y(x)) = 1+x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\arcsin \left (-x +{\mathrm e}^{-x} c_1 \right ) \]
Mathematica. Time used: 27.91 (sec). Leaf size: 17
ode=D[y[x],x]*Cos[y[x]]+Sin[y[x]]==x+1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \arcsin \left (x-c_1 e^{-x}\right ) \]
Sympy. Time used: 1.752 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + sin(y(x)) + cos(y(x))*Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \operatorname {asin}{\left (C_{1} e^{- x} - x \right )} + \pi , \ y{\left (x \right )} = - \operatorname {asin}{\left (C_{1} e^{- x} - x \right )}\right ] \]