58.5.19 problem 19

Internal problem ID [14613]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.3 (Linear equations). Exercises page 56
Problem number : 19
Date solved : Thursday, October 02, 2025 at 09:44:20 AM
CAS classification : [_linear]

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

With initial conditions

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