56.1.11 problem 11

Internal problem ID [8723]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 11
Date solved : Sunday, March 30, 2025 at 01:24:55 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 31
ode:=diff(y(x),x) = x+sec(x)*y(x)/x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\int x \,{\mathrm e}^{-\int \frac {\sec \left (x \right )}{x}d x}d x +c_1 \right ) {\mathrm e}^{\int \frac {\sec \left (x \right )}{x}d x} \]
Mathematica. Time used: 0.255 (sec). Leaf size: 56
ode=D[y[x],x] == x+Sec[x]*y[x]/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \exp \left (\int _1^x\frac {\sec (K[1])}{K[1]}dK[1]\right ) \left (\int _1^x\exp \left (-\int _1^{K[2]}\frac {\sec (K[1])}{K[1]}dK[1]\right ) K[2]dK[2]+c_1\right ) \]
Sympy. Time used: 13.992 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + Derivative(y(x), x) - y(x)/(x*cos(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - \int x e^{- \int \frac {1}{x \cos {\left (x \right )}}\, dx}\, dx - \int \frac {y{\left (x \right )} e^{- \int \frac {1}{x \cos {\left (x \right )}}\, dx}}{x \cos {\left (x \right )}}\, dx = C_{1} \]