27.1.4 problem 4

Internal problem ID [4298]
Book : An introduction to the solution and applications of differential equations, J.W. Searl, 1966
Section : Chapter 4, Ex. 4.1
Problem number : 4
Date solved : Sunday, March 30, 2025 at 02:52:47 AM
CAS classification : [_exact]

\begin{align*} \cos \left (y\right )-x \sin \left (y\right ) y^{\prime }&=\sec \left (x \right )^{2} \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=0 \end{align*}

Maple. Time used: 0.757 (sec). Leaf size: 23
ode:=cos(y(x))-x*sin(y(x))*diff(y(x),x) = sec(x)^2; 
ic:=y(0) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\begin{align*} y &= \arccos \left (\frac {\tan \left (x \right )}{x}\right ) \\ y &= -\arccos \left (\frac {\tan \left (x \right )}{x}\right ) \\ \end{align*}
Mathematica
ode=Cos[y[x]]-x*Sin[y[x]]*D[y[x],x]==Sec[x]^2; 
ic=y[0]==0; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

{}

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*sin(y(x))*Derivative(y(x), x) + cos(y(x)) - 1/cos(x)**2,0) 
ics = {y(0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out