76.12.1 problem 1

Internal problem ID [17486]
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 : 1
Date solved : Monday, March 31, 2025 at 04:15:04 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

With initial conditions

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

Maple. Time used: 0.104 (sec). Leaf size: 82
ode:=t*diff(diff(y(t),t),t)+3*y(t) = t; 
ic:=y(1) = 1, D(y)(1) = 2; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = \frac {2 \left (\sqrt {3}\, \operatorname {BesselY}\left (0, 2 \sqrt {3}\right )-\frac {5 \operatorname {BesselY}\left (1, 2 \sqrt {3}\right )}{2}\right ) \sqrt {t}\, \pi \operatorname {BesselJ}\left (1, 2 \sqrt {3}\, \sqrt {t}\right )}{3}-\frac {2 \left (\sqrt {3}\, \operatorname {BesselJ}\left (0, 2 \sqrt {3}\right )-\frac {5 \operatorname {BesselJ}\left (1, 2 \sqrt {3}\right )}{2}\right ) \sqrt {t}\, \pi \operatorname {BesselY}\left (1, 2 \sqrt {3}\, \sqrt {t}\right )}{3}+\frac {t}{3} \]
Mathematica. Time used: 0.228 (sec). Leaf size: 673
ode=t*D[y[t],{t,2}]+3*y[t]==t; 
ic={y[1]==1,Derivative[1][y][1]==2}; 
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(t*Derivative(y(t), (t, 2)) - t + 3*y(t),0) 
ics = {y(1): 1, Subs(Derivative(y(t), t), t, 1): 2} 
dsolve(ode,func=y(t),ics=ics)
 
NotImplementedError : solve: Cannot solve t*Derivative(y(t), (t, 2)) - t + 3*y(t)