76.12.2 problem 2

Internal problem ID [17487]
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.2 (Theory of second order linear homogeneous equations). Problems at page 226
Problem number : 2
Date solved : Monday, March 31, 2025 at 04:15:05 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

With initial conditions

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

Maple. Time used: 1.366 (sec). Leaf size: 420
ode:=(t-1)*diff(diff(y(t),t),t)-3*t*diff(y(t),t)+4*y(t) = sin(t); 
ic:=y(-2) = 2, D(y)(-2) = 1; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ \text {Expression too large to display} \]
Mathematica. Time used: 0.524 (sec). Leaf size: 782
ode=(t-1)*D[y[t],{t,2}]-3*t*D[y[t],t]+4*y[t]==Sin[t]; 
ic={y[-2]==2,Derivative[1][y][-2]==1}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}

Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-3*t*Derivative(y(t), t) + (t - 1)*Derivative(y(t), (t, 2)) + 4*y(t) - sin(t),0) 
ics = {y(-2): 2, Subs(Derivative(y(t), t), t, -2): 1} 
dsolve(ode,func=y(t),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(t), t) - (t*Derivative(y(t), (t, 2)) + 4*y(t) - sin(t) - Derivative(y(t), (t, 2)))/(3*t) cannot be solved by the factorable group method