56.1.10 problem 10

Internal problem ID [8722]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 10
Date solved : Wednesday, March 05, 2025 at 06:13:48 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.002 (sec). Leaf size: 15
ode:=diff(y(x),x) = 1+sec(x)/x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \int \frac {\sec \left (x \right )}{x}d x +x +c_{1} \]
Mathematica. Time used: 0.733 (sec). Leaf size: 25
ode=D[y[x],x] == 1+Sec[x]/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \int _1^x\left (\frac {\sec (K[1])}{K[1]}+1\right )dK[1]+c_1 \]
Sympy. Time used: 1.659 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - 1 - 1/(x*cos(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + \int \frac {x \cos {\left (x \right )} + 1}{x \cos {\left (x \right )}}\, dx \]