40.3.27 problem 26 (a)

Internal problem ID [6631]
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 : 26 (a)
Date solved : Wednesday, March 05, 2025 at 01:34:02 AM
CAS classification : [_linear]

\begin{align*} -y-x^{2} {\mathrm e}^{x}+x y^{\prime }&=0 \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 10
ode:=-y(x)-x^2*exp(x)+x*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_1 +{\mathrm e}^{x}\right ) x \]
Mathematica. Time used: 0.051 (sec). Leaf size: 13
ode=(-y[x]-x^2*Exp[x])+x*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x \left (e^x+c_1\right ) \]
Sympy. Time used: 0.219 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*exp(x) + x*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \left (C_{1} + e^{x}\right ) \]