38.1.6 problem 6

Internal problem ID [6423]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 24. First order differential equations. Test excercise 24. page 1067
Problem number : 6
Date solved : Wednesday, March 05, 2025 at 12:39:50 AM
CAS classification : [_separable]

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

Maple. Time used: 0.007 (sec). Leaf size: 8
ode:=x*cos(y(x))*diff(y(x),x)-sin(y(x)) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arcsin \left (c_1 x \right ) \]
Mathematica. Time used: 9.243 (sec). Leaf size: 17
ode=x*Cos[y[x]]*D[y[x],x]-Sin[y[x]]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \arcsin \left (e^{c_1} x\right ) \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.337 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*cos(y(x))*Derivative(y(x), x) - sin(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \pi - \operatorname {asin}{\left (C_{1} x \right )}, \ y{\left (x \right )} = \operatorname {asin}{\left (C_{1} x \right )}\right ] \]