85.15.13 problem 2 (c)

Internal problem ID [22538]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 47
Problem number : 2 (c)
Date solved : Thursday, October 02, 2025 at 08:48:39 PM
CAS classification : [`y=_G(x,y')`]

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

With initial conditions

\begin{align*} y \left (2\right )&=0 \\ \end{align*}
Maple. Time used: 0.129 (sec). Leaf size: 14
ode:=diff(y(x),x) = (2*x-sin(y(x)))/x/cos(y(x)); 
ic:=[y(2) = 0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \arcsin \left (\frac {x^{2}-4}{x}\right ) \]
Mathematica. Time used: 5.985 (sec). Leaf size: 15
ode=D[y[x],x]==(2*x-Sin[y[x]]) /(x*Cos[y[x]]); 
ic={y[2]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \arcsin \left (\frac {x^2-4}{x}\right ) \end{align*}
Sympy. Time used: 3.529 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (2*x - sin(y(x)))/(x*cos(y(x))),0) 
ics = {y(2): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \operatorname {asin}{\left (x - \frac {4}{x} \right )} \]