76.15.31 problem 32

Internal problem ID [17593]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 4. Second order linear equations. Section 4.5 (Nonhomogeneous Equations, Method of Undetermined Coefficients). Problems at page 260
Problem number : 32
Date solved : Thursday, March 13, 2025 at 10:37:25 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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