76.17.21 problem 30

Internal problem ID [17636]
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.7 (Variation of parameters). Problems at page 280
Problem number : 30
Date solved : Monday, March 31, 2025 at 04:23:16 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} t^{2} y^{\prime \prime }-2 t y^{\prime }+2 y&=4 t^{2} \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 18
ode:=t^2*diff(diff(y(t),t),t)-2*t*diff(y(t),t)+2*y(t) = 4*t^2; 
dsolve(ode,y(t), singsol=all);
 
\[ y = t \left (4 t \ln \left (t \right )+\left (c_2 -4\right ) t +c_1 \right ) \]
Mathematica. Time used: 0.012 (sec). Leaf size: 21
ode=t^2*D[y[t],{t,2}]-2*t*D[y[t],t]+2*y[t]==4*t^2; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to t (4 t \log (t)+(-4+c_2) t+c_1) \]
Sympy. Time used: 0.216 (sec). Leaf size: 15
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(t**2*Derivative(y(t), (t, 2)) - 4*t**2 - 2*t*Derivative(y(t), t) + 2*y(t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = t \left (C_{1} + C_{2} t + 4 t \log {\left (t \right )}\right ) \]