73.1.24 problem 4 (vi)

Internal problem ID [19797]
Book : Elementary Differential Equations. By R.L.E. Schwarzenberger. Chapman and Hall. London. First Edition (1969)
Section : Chapter 3. Solutions of first-order equations. Exercises at page 47
Problem number : 4 (vi)
Date solved : Thursday, October 02, 2025 at 04:43:52 PM
CAS classification : [_linear]

\begin{align*} x^{\prime } t +x \ln \left (t \right )&=t^{2} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 25
ode:=t*diff(x(t),t)+x(t)*ln(t) = t^2; 
dsolve(ode,x(t), singsol=all);
 
\[ x = \left (\int t \,{\mathrm e}^{\frac {\ln \left (t \right )^{2}}{2}}d t +c_1 \right ) {\mathrm e}^{-\frac {\ln \left (t \right )^{2}}{2}} \]
Mathematica. Time used: 0.092 (sec). Leaf size: 48
ode=t*D[x[t],t]+x[t]*Log[t]==t^2; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{2} e^{-\frac {1}{2} \log ^2(t)-2} \left (\sqrt {2 \pi } \text {erfi}\left (\frac {\log (t)+2}{\sqrt {2}}\right )+2 e^2 c_1\right ) \end{align*}
Sympy. Time used: 13.775 (sec). Leaf size: 31
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-t**2 + t*Derivative(x(t), t) + x(t)*log(t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ - \int t e^{\frac {\log {\left (t \right )}^{2}}{2}}\, dt + \int \frac {x{\left (t \right )} e^{\frac {\log {\left (t \right )}^{2}}{2}} \log {\left (t \right )}}{t}\, dt = C_{1} \]