73.3.43 problem 4.8 (b)

Internal problem ID [14998]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 4. SEPARABLE FIRST ORDER EQUATIONS. Additional exercises. page 90
Problem number : 4.8 (b)
Date solved : Thursday, March 13, 2025 at 05:26:07 AM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (0\right )&=-4 \end{align*}

Maple. Time used: 0.236 (sec). Leaf size: 14
ode:=y(x)*diff(y(x),x) = sin(x); 
ic:=y(0) = -4; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -\sqrt {18-2 \cos \left (x \right )} \]
Mathematica. Time used: 0.098 (sec). Leaf size: 28
ode=y[x]*D[y[x],x]==Sin[x]; 
ic={y[0]==-4}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\sqrt {2} \sqrt {\int _0^x\sin (K[1])dK[1]+8} \]
Sympy. Time used: 0.537 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)*Derivative(y(x), x) - sin(x),0) 
ics = {y(0): -4} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \sqrt {18 - 2 \cos {\left (x \right )}} \]