25.1.5 problem 5

Internal problem ID [4217]
Book : Advanced Mathematica, Book2, Perkin and Perkin, 1992
Section : Chapter 11.3, page 316
Problem number : 5
Date solved : Tuesday, March 04, 2025 at 05:56:26 PM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 12
ode:=diff(y(x),x) = x*sec(y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \arcsin \left (\frac {x^{2}}{2}+c_{1} \right ) \]
Mathematica. Time used: 0.42 (sec). Leaf size: 31
ode=D[y[x],x]==x*Sec[y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \arcsin \left (\frac {x^2}{2}+c_1\right ) \\ y(x)\to \arcsin \left (\frac {x^2}{2}+c_1\right ) \\ \end{align*}
Sympy. Time used: 0.263 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x/cos(y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \pi - \operatorname {asin}{\left (C_{1} + \frac {x^{2}}{2} \right )}, \ y{\left (x \right )} = \operatorname {asin}{\left (C_{1} + \frac {x^{2}}{2} \right )}\right ] \]