40.4.3 problem 19 (d)

Internal problem ID [6643]
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 : Sunday, March 30, 2025 at 11:13:13 AM
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.145 (sec). Leaf size: 33
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]
 
\[ y(x)\to \frac {1}{6} x^3 \left (\operatorname {ExpIntegralEi}(x)-\frac {e^x \left (x^2+x-4\right )}{x^3}+6 c_1\right ) \]
Sympy. Time used: 0.814 (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 ) \]