83.1.1 problem 2 (a)

Internal problem ID [21906]
Book : Differential Equations By Kaj L. Nielsen. Second edition 1966. Barnes and nobel. 66-28306
Section : Chapter II. Definitions and fundamentals
Problem number : 2 (a)
Date solved : Thursday, October 02, 2025 at 08:09:09 PM
CAS classification : [_linear]

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