67.3.2 problem 4.3 (b)

Internal problem ID [16323]
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.3 (b)
Date solved : Thursday, October 02, 2025 at 01:18:56 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }&=3 x -y \sin \left (x \right ) \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 21
ode:=diff(y(x),x) = 3*x-y(x)*sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (3 \int x \,{\mathrm e}^{-\cos \left (x \right )}d x +c_1 \right ) {\mathrm e}^{\cos \left (x \right )} \]
Mathematica. Time used: 0.039 (sec). Leaf size: 51
ode=D[y[x],x]==3*x-y[x]*Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \exp \left (\int _1^x-\sin (K[1])dK[1]\right ) \left (\int _1^x3 \exp \left (-\int _1^{K[2]}-\sin (K[1])dK[1]\right ) K[2]dK[2]+c_1\right ) \end{align*}
Sympy. Time used: 7.808 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*x + y(x)*sin(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - 3 \int x e^{- \cos {\left (x \right )}}\, dx + \int y{\left (x \right )} e^{- \cos {\left (x \right )}} \sin {\left (x \right )}\, dx = C_{1} \]