31.2.7 problem 7

Internal problem ID [5728]
Book : Differential Equations, By George Boole F.R.S. 1865
Section : Chapter 3
Problem number : 7
Date solved : Tuesday, March 04, 2025 at 11:30:34 PM
CAS classification : [_exact]

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

Maple. Time used: 0.029 (sec). Leaf size: 43
ode:=n*cos(n*x+m*y(x))-m*sin(m*x+n*y(x))+(m*cos(n*x+m*y(x))-n*sin(m*x+n*y(x)))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {-n x +\operatorname {RootOf}\left (2 m^{2} x -2 n^{2} x -m \pi -2 \arcsin \left (\sin \left (\textit {\_Z} \right )+c_{1} \right ) m +2 \textit {\_Z} n \right )}{m} \]
Mathematica. Time used: 0.656 (sec). Leaf size: 50
ode=(n*Cos[n*x+m*y[x]]-m*Sin[m*x+n*y[x]])+(m*Cos[n*x+m*y[x]]-n*Sin[m*x+n*y[x]])*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}[\sin (m x) \sin (n y(x))-\cos (m x) \cos (n y(x))-\sin (n x) \cos (m y(x))-\cos (n x) \sin (m y(x))=c_1,y(x)] \]
Sympy
from sympy import * 
x = symbols("x") 
m = symbols("m") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-m*sin(m*x + n*y(x)) + n*cos(m*y(x) + n*x) + (m*cos(m*y(x) + n*x) - n*sin(m*x + n*y(x)))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out