20.1.20 problem Problem 28

Internal problem ID [3577]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.2, Basic Ideas and Terminology. page 21
Problem number : Problem 28
Date solved : Sunday, March 30, 2025 at 01:51:40 AM
CAS classification : [`y=_G(x,y')`]

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

Maple. Time used: 0.008 (sec). Leaf size: 15
ode:=diff(y(x),x) = (exp(x)-sin(y(x)))/x/cos(y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \arcsin \left (\frac {{\mathrm e}^{x}-c_1}{x}\right ) \]
Mathematica. Time used: 11.044 (sec). Leaf size: 16
ode=D[y[x],x]==(Exp[x]-Sin[y[x]])/(x*Cos[y[x]]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \arcsin \left (\frac {e^x+c_1}{x}\right ) \]
Sympy. Time used: 6.980 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (exp(x) - sin(y(x)))/(x*cos(y(x))),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \operatorname {asin}{\left (\frac {C_{1} - e^{x}}{x} \right )} + \pi , \ y{\left (x \right )} = - \operatorname {asin}{\left (\frac {C_{1} - e^{x}}{x} \right )}\right ] \]