68.1.50 problem 57

Internal problem ID [17117]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 1. Introduction to Differential Equations. Exercises 1.1, page 10
Problem number : 57
Date solved : Thursday, October 02, 2025 at 01:43:24 PM
CAS classification : [_quadrature]

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

With initial conditions

\begin{align*} y \left (\frac {2}{\pi }\right )&=1 \\ \end{align*}
Maple. Time used: 0.019 (sec). Leaf size: 12
ode:=diff(y(x),x) = cos(1/x)/x^2; 
ic:=[y(2/Pi) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\sin \left (\frac {1}{x}\right )+2 \]
Mathematica. Time used: 0.005 (sec). Leaf size: 13
ode=D[y[x],x]==Cos[1/x]/x^2; 
ic={y[2/Pi]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 2-\sin \left (\frac {1}{x}\right ) \end{align*}
Sympy. Time used: 0.153 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - cos(1/x)/x**2,0) 
ics = {y(2/pi): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 2 - \sin {\left (\frac {1}{x} \right )} \]