38.3.19 problem 27

Internal problem ID [8286]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 1. Introduction to differential equations. Review problems at page 34
Problem number : 27
Date solved : Tuesday, September 30, 2025 at 05:21:40 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }+y \sin \left (x \right )&=x \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 19
ode:=diff(y(x),x)+y(x)*sin(x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\int x \,{\mathrm e}^{-\cos \left (x \right )}d x +c_1 \right ) {\mathrm e}^{\cos \left (x \right )} \]
Mathematica. Time used: 0.038 (sec). Leaf size: 50
ode=D[y[x],x]+y[x]*Sin[x]==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^x\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.604 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + y(x)*sin(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - \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} \]