76.3.1 problem 1

Internal problem ID [17301]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.4 (Differences between linear and nonlinear equations). Problems at page 79
Problem number : 1
Date solved : Monday, March 31, 2025 at 03:50:02 PM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (1\right )&=2 \end{align*}

Maple. Time used: 0.175 (sec). Leaf size: 76
ode:=(t-3)*diff(y(t),t)+ln(t)*y(t) = 2*t; 
ic:=y(1) = 2; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = 2 \,{\mathrm e}^{\ln \left (3\right )^{2}+\operatorname {dilog}\left (\frac {t}{3}\right )} \left (2^{\ln \left (3\right )} {\mathrm e}^{-\frac {\ln \left (3\right )^{2}}{2}+\operatorname {dilog}\left (3\right )}-\int _{1}^{t}\textit {\_z1} \,{\mathrm e}^{-\ln \left (3\right )^{2}-\operatorname {dilog}\left (\frac {\textit {\_z1}}{3}\right )} \left (-\textit {\_z1} +3\right )^{-1+\ln \left (3\right )}d \textit {\_z1} \right ) \left (-t +3\right )^{-\ln \left (3\right )} \]
Mathematica. Time used: 0.092 (sec). Leaf size: 94
ode=(t-3)*D[y[t],t]+Log[t]*y[t]==2*t; 
ic={y[1]==2}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^{\operatorname {PolyLog}\left (2,1-\frac {t}{3}\right )-\operatorname {PolyLog}\left (2,\frac {2}{3}\right )-\log (3) \log (t-3)} \left (e^{\operatorname {PolyLog}\left (2,\frac {2}{3}\right )} \int _1^t\frac {2 e^{\log (3) \log (K[1]-3)-\operatorname {PolyLog}\left (2,1-\frac {K[1]}{3}\right )} K[1]}{K[1]-3}dK[1]+2\ 3^{\log (2)+i \pi }\right ) \]
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-2*t + (t - 3)*Derivative(y(t), t) + y(t)*log(t),0) 
ics = {y(1): 2} 
dsolve(ode,func=y(t),ics=ics)
 
Timed Out