15.4.9 problem 10

Internal problem ID [2922]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 8, page 34
Problem number : 10
Date solved : Tuesday, March 04, 2025 at 03:30:00 PM
CAS classification : [[_linear, `class A`]]

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

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