32.9.18 problem Exercise 22, problem 18, page 240

Internal problem ID [5992]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 4. Higher order linear differential equations. Lesson 22. Variation of Parameters
Problem number : Exercise 22, problem 18, page 240
Date solved : Wednesday, March 05, 2025 at 12:02:07 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.007 (sec). Leaf size: 20
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)-4*y(x) = x^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {c_{2}}{x^{2}}+c_{1} x^{2}+\frac {x^{3}}{5} \]
Mathematica. Time used: 0.015 (sec). Leaf size: 25
ode=x^2*D[y[x],{x,2}]+x*D[y[x],x]-4*y[x]==x^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x^3}{5}+c_2 x^2+\frac {c_1}{x^2} \]
Sympy. Time used: 0.230 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 + x**2*Derivative(y(x), (x, 2)) + x*Derivative(y(x), x) - 4*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \frac {x^{4} \left (C_{2} + x\right )}{5}}{x^{2}} \]