80.4.1 problem 1

Internal problem ID [18481]
Book : Elementary Differential Equations. By Thornton C. Fry. D Van Nostrand. NY. First Edition (1929)
Section : Chapter IV. Methods of solution: First order equations. section 31. Problems at page 85
Problem number : 1
Date solved : Monday, March 31, 2025 at 05:36:25 PM
CAS classification : [_separable]

\begin{align*} y^{\prime }+x y&=x \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=diff(y(x),x)+x*y(x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = 1+{\mathrm e}^{-\frac {x^{2}}{2}} c_1 \]
Mathematica. Time used: 0.062 (sec). Leaf size: 24
ode=D[y[x],x]+x*y[x]==x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 1+c_1 e^{-\frac {x^2}{2}} \\ y(x)\to 1 \\ \end{align*}
Sympy. Time used: 0.263 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x) - x + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- \frac {x^{2}}{2}} + 1 \]