90.3.26 problem 26

Internal problem ID [25090]
Book : Ordinary Differential Equations. By William Adkins and Mark G Davidson. Springer. NY. 2010. ISBN 978-1-4614-3617-1
Section : Chapter 1. First order differential equations. Exercises at page 41
Problem number : 26
Date solved : Thursday, October 02, 2025 at 11:49:52 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (1\right )&={\mathrm e} \\ \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 10
ode:=diff(y(x),x) = (x*y(x)+2*y(x))/x; 
ic:=[y(1) = exp(1)]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} x^{2} \]
Mathematica. Time used: 0.018 (sec). Leaf size: 12
ode=D[y[x],{x,1}] ==(x*y[x]+2*y[x])/x; 
ic={y[1]==Exp[1]}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^x x^2 \end{align*}
Sympy. Time used: 0.135 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (x*y(x) + 2*y(x))/x,0) 
ics = {y(1): E} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x^{2} e^{x} \]