74.5.19 problem 19

Internal problem ID [15904]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 2. First Order Equations. Exercises 2.3, page 49
Problem number : 19
Date solved : Thursday, March 13, 2025 at 06:56:51 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }-y x&=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.026 (sec). Leaf size: 24
ode=D[y[x],x]-y[x]*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.290 (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 \]