44.8.9 problem 2(a)

Internal problem ID [9211]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 1. What is a differential equation. Problems for Review and Discovery. Page 53
Problem number : 2(a)
Date solved : Tuesday, September 30, 2025 at 06:14:46 PM
CAS classification : [_linear]

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

With initial conditions

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