65.7.5 problem 5

Internal problem ID [15713]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.3.3, page 71
Problem number : 5
Date solved : Thursday, October 02, 2025 at 10:23:49 AM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (-1\right )&=-1 \\ \end{align*}
Maple. Time used: 0.028 (sec). Leaf size: 17
ode:=diff(y(x),x) = y(x)/x+sin(x^2); 
ic:=[y(-1) = -1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {\left (-\operatorname {Si}\left (x^{2}\right )-2+\operatorname {Si}\left (1\right )\right ) x}{2} \]
Mathematica. Time used: 0.027 (sec). Leaf size: 20
ode=D[y[x],x]==y[x]/x+Sin[x^2]; 
ic={y[-1]==-1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} x \left (\text {Si}\left (x^2\right )-\text {Si}(1)+2\right ) \end{align*}
Sympy. Time used: 0.565 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sin(x**2) + Derivative(y(x), x) - y(x)/x,0) 
ics = {y(-1): -1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \left (\frac {\operatorname {Si}{\left (x^{2} \right )}}{2} - \frac {\operatorname {Si}{\left (1 \right )}}{2} + 1\right ) \]