90.20.19 problem 16 (3 d)

Internal problem ID [25314]
Book : Ordinary Differential Equations. By William Adkins and Mark G Davidson. Springer. NY. 2010. ISBN 978-1-4614-3617-1
Section : Chapter 5. Second Order Linear Differential Equations. Exercises at page 337
Problem number : 16 (3 d)
Date solved : Thursday, October 02, 2025 at 11:59:56 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

With initial conditions

\begin{align*} y \left (0\right )&=a \\ y^{\prime }\left (0\right )&=b \\ \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 25
ode:=(t^2+1)*diff(diff(y(t),t),t)-4*t*diff(y(t),t)+6*y(t) = 2*t; 
ic:=[y(0) = a, D(y)(0) = b]; 
dsolve([ode,op(ic)],y(t), singsol=all);
 
\[ y = \frac {\left (-b +1\right ) t^{3}}{3}-3 a \,t^{2}+b t +a \]
Mathematica. Time used: 0.033 (sec). Leaf size: 30
ode=(1+t^2)*D[y[t],{t,2}]-4*t*D[y[t],t]+6*y[t]==2*t; 
ic={y[0]==a,Derivative[1][y][0] ==b}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to -3 a t^2+a+\frac {1}{3} \left (t^3-b t \left (t^2-3\right )\right ) \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-4*t*Derivative(y(t), t) - 2*t + (t**2 + 1)*Derivative(y(t), (t, 2)) + 6*y(t),0) 
ics = {y(0): a, Subs(Derivative(y(t), t), t, 0): b} 
dsolve(ode,func=y(t),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(t), t) - (t*(t*Derivative(y(t), (t, 2)) - 2) + 6*y(