64.12.10 problem 10

Internal problem ID [13443]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.4. Variation of parameters. Exercises page 162
Problem number : 10
Date solved : Monday, March 31, 2025 at 07:58:01 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.003 (sec). Leaf size: 23
ode:=diff(diff(y(x),x),x)-2*diff(y(x),x)+y(x) = x*exp(x)*ln(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} \left (c_2 +c_1 x +\frac {x^{3} \left (6 \ln \left (x \right )-5\right )}{36}\right ) \]
Mathematica. Time used: 0.019 (sec). Leaf size: 32
ode=D[y[x],{x,2}]-2*D[y[x],x]+y[x]==x*Exp[x]*Log[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{36} e^x \left (x^3 (6 \log (x)-5)+36 c_2 x+36 c_1\right ) \]
Sympy. Time used: 0.273 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*exp(x)*log(x) + y(x) - 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + x \left (C_{2} + \frac {x^{2} \log {\left (x \right )}}{6} - \frac {5 x^{2}}{36}\right )\right ) e^{x} \]