41.1.31 problem 31

Internal problem ID [8698]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.1 Separable equations problems. page 7
Problem number : 31
Date solved : Tuesday, September 30, 2025 at 05:41:44 PM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

\begin{align*} y^{\prime }+\sin \left (x +y\right )^{2}&=0 \end{align*}
Maple. Time used: 0.013 (sec). Leaf size: 16
ode:=diff(y(x),x)+sin(x+y(x))^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -x -\arctan \left (-x +c_1 \right ) \]
Mathematica. Time used: 0.122 (sec). Leaf size: 27
ode=D[y[x],x]+Sin[x+y[x]]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}[2 (\tan (y(x)+x)-\arctan (\tan (y(x)+x)))+2 y(x)=c_1,y(x)] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(sin(x + y(x))**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out