90.25.13 problem 13

Internal problem ID [25394]
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 379
Problem number : 13
Date solved : Friday, October 03, 2025 at 12:00:54 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-\tan \left (t \right ) y^{\prime }-\sec \left (t \right )^{2} y&=t \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 27
ode:=diff(diff(y(t),t),t)-tan(t)*diff(y(t),t)-sec(t)^2*y(t) = t; 
dsolve(ode,y(t), singsol=all);
 
\[ y = \frac {\left (t^{2}+2 c_1 -2 c_2 -2\right ) \tan \left (t \right )}{2}+\left (c_1 +c_2 \right ) \sec \left (t \right )+t \]
Mathematica. Time used: 0.098 (sec). Leaf size: 49
ode=D[y[t],{t,2}]-Tan[t]*D[y[t],t]-Sec[t]^2*y[t]==t; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to \frac {1}{2} \tan (t) \left (t^2-2 i c_2 \sqrt {-\cot ^2(t)} \sec (t)-2\right )+t+\frac {c_1}{\sqrt {-\cot ^2(t)}} \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-t - y(t)*sec(t)**2 - tan(t)*Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
NotImplementedError : The given ODE -(-t - y(t)*sec(t)**2 + Derivative(y(t), (t, 2)))/tan(t) + Deriv