40.12.1 problem 6

Internal problem ID [6749]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 17. Linear equations with variable coefficients (Cauchy and Legndre). Supplemetary problems. Page 110
Problem number : 6
Date solved : Wednesday, March 05, 2025 at 02:42:41 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.003 (sec). Leaf size: 27
ode:=x^2*diff(diff(y(x),x),x)-3*x*diff(y(x),x)+4*y(x) = x+ln(x)*x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\ln \left (x \right )^{3} x^{2}}{6}+\ln \left (x \right ) x^{2} c_1 +c_2 \,x^{2}+x \]
Mathematica. Time used: 0.038 (sec). Leaf size: 30
ode=x^2*D[y[x],{x,2}]-3*x*D[y[x],x]+4*y[x]==x+x^2*Log[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{6} x \left (x \log ^3(x)+6 c_1 x+12 c_2 x \log (x)+6\right ) \]
Sympy. Time used: 0.377 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*log(x) + x**2*Derivative(y(x), (x, 2)) - 3*x*Derivative(y(x), x) - x + 4*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x \left (C_{1} x + C_{2} x \log {\left (x \right )} + x \log {\left (x \right )}^{3} + 6\right )}{6} \]