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 : Sunday, March 30, 2025 at 10:06:20 AM
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.015 (sec). Leaf size: 36
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 = \frac {-m x +\operatorname {RootOf}\left (-m^{2} x +n^{2} x +\arcsin \left (\cos \left (\textit {\_Z} \right )+c_1 \right ) n +\textit {\_Z} m \right )}{n} \]
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