13.10.10 problem 12

Internal problem ID [2411]
Book : Differential equations and their applications, 3rd ed., M. Braun
Section : Section 2.4, The method of variation of parameters. Page 154
Problem number : 12
Date solved : Sunday, March 30, 2025 at 12:00:42 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.006 (sec). Leaf size: 22
ode:=diff(diff(y(t),t),t)-2*t/(t^2+1)*diff(y(t),t)+2/(t^2+1)*y(t) = t^2+1; 
dsolve(ode,y(t), singsol=all);
 
\[ y = t c_2 +c_1 \,t^{2}-c_1 +\frac {1}{2}+\frac {1}{6} t^{4} \]
Mathematica. Time used: 0.051 (sec). Leaf size: 33
ode=D[y[t],{t,2}]-2*t/(1+t^2)*D[y[t],t]+2/(1+t^2)*y[t]==1+t^2; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {1}{6} \left (t^2+3\right ) t^2+c_2 t-c_1 (t-i)^2 \]
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-t**2 - 2*t*Derivative(y(t), t)/(t**2 + 1) + Derivative(y(t), (t, 2)) - 1 + 2*y(t)/(t**2 + 1),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(t), t) - (t**2*(-t**2 + Derivative(y(t), (t, 2)) - 2) + 2*y(t) + Derivative(y(t), (t, 2)) - 1)/(2*t) cannot be solved by the factorable group method