34.4.3 problem 19 (d)

Internal problem ID [7930]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 6. Equations of first order and first degree (Linear equations). Supplemetary problems. Page 39
Problem number : 19 (d)
Date solved : Tuesday, September 30, 2025 at 05:10:12 PM
CAS classification : [_linear]

\begin{align*} -3 y-\left (x -2\right ) {\mathrm e}^{x}+x y^{\prime }&=0 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 34
ode:=-3*y(x)-(x-2)*exp(x)+x*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {x^{3} \operatorname {Ei}_{1}\left (-x \right )}{6}+\frac {\left (-x^{2}-x +4\right ) {\mathrm e}^{x}}{6}+c_1 \,x^{3} \]
Mathematica. Time used: 0.1 (sec). Leaf size: 32
ode=(-2*y[x]-(x-2)*Exp[x])+x*D[y[x],x]-y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x^3 \left (\int _1^x\frac {e^{K[1]} (K[1]-2)}{K[1]^4}dK[1]+c_1\right ) \end{align*}
Sympy. Time used: 0.515 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - (x - 2)*exp(x) - 3*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} x^{3} - x \operatorname {E}_{3}\left (- x\right ) + 2 \operatorname {E}_{4}\left (- x\right ) \]