19.2.2 problem 2

Internal problem ID [3531]
Book : Differential equations and linear algebra, Stephen W. Goode, second edition, 2000
Section : 1.6, page 50
Problem number : 2
Date solved : Sunday, March 30, 2025 at 01:46:17 AM
CAS classification : [_linear]

\begin{align*} x^{2} y^{\prime }-4 x y&=x^{7} \sin \left (x \right ) \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 17
ode:=x^2*diff(y(x),x)-4*x*y(x) = x^7*sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\sin \left (x \right )-x \cos \left (x \right )+c_1 \right ) x^{4} \]
Mathematica. Time used: 0.055 (sec). Leaf size: 19
ode=x^2*D[y[x],x]-4*x*y[x]==x^7*Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^4 (\sin (x)-x \cos (x)+c_1) \]
Sympy. Time used: 0.645 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**7*sin(x) + x**2*Derivative(y(x), x) - 4*x*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x^{4} \left (C_{1} - x \cos {\left (x \right )} + \sin {\left (x \right )}\right ) \]