68.12.55 problem 62 (a)

Internal problem ID [17649]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 4. Higher Order Equations. Exercises 4.4, page 163
Problem number : 62 (a)
Date solved : Thursday, October 02, 2025 at 02:26:48 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

With initial conditions

\begin{align*} y \left (\pi \right )&=-1 \\ y^{\prime }\left (\pi \right )&=-\frac {1}{\pi } \\ \end{align*}
Maple. Time used: 0.027 (sec). Leaf size: 14
ode:=t*diff(diff(y(t),t),t)+2*diff(y(t),t)+t*y(t) = -t; 
ic:=[y(Pi) = -1, D(y)(Pi) = -1/Pi]; 
dsolve([ode,op(ic)],y(t), singsol=all);
 
\[ y = \frac {\sin \left (t \right )-t}{t} \]
Mathematica. Time used: 0.017 (sec). Leaf size: 36
ode=t*D[y[t],{t,2}]+2*D[y[t],t]+t*y[t]==-t; 
ic={y[Pi]==-1,Derivative[1][y][Pi]==-1/Pi}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to \frac {i \left (2 i t+e^{-i t}-e^{i t}\right )}{2 t} \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(t*y(t) + t*Derivative(y(t), (t, 2)) + t + 2*Derivative(y(t), t),0) 
ics = {y(pi): -1, Subs(Derivative(y(t), t), t, pi): -1/pi} 
dsolve(ode,func=y(t),ics=ics)
 
NotImplementedError : The given ODE -t*(-y(t) - Derivative(y(t), (t, 2)) - 1)/2 + Derivative(y(t), t) cannot be solved by the factorable group method