40.3.3 problem 23 (e)

Internal problem ID [6607]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 5. Equations of first order and first degree (Exact equations). Supplemetary problems. Page 33
Problem number : 23 (e)
Date solved : Sunday, March 30, 2025 at 11:12:11 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 15
ode:=x+y(x)*cos(x)+sin(x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {\left (x^{2}-2 c_1 \right ) \csc \left (x \right )}{2} \]
Mathematica. Time used: 0.034 (sec). Leaf size: 19
ode=(x+y[x]*Cos[x])+Sin[x]*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {1}{2} \left (x^2-2 c_1\right ) \csc (x) \]
Sympy. Time used: 0.296 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x + y(x)*cos(x) + sin(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} - \frac {x^{2}}{2}}{\sin {\left (x \right )}} \]