10.10.13 problem 13

Internal problem ID [1345]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Chapter 3, Second order linear equations, section 3.6, Variation of Parameters. page 190
Problem number : 13
Date solved : Saturday, March 29, 2025 at 10:52:48 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.002 (sec). Leaf size: 22
ode:=t^2*diff(diff(y(t),t),t)-2*y(t) = 3*t^2-1; 
dsolve(ode,y(t), singsol=all);
 
\[ y = t^{2} c_2 +t^{2} \ln \left (t \right )+\frac {1}{2}+\frac {c_1}{t} \]
Mathematica. Time used: 0.015 (sec). Leaf size: 31
ode=t^2*D[y[t],{t,2}]-2*y[t] == 3*t^2-1; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to t^2 \log (t)+\left (-\frac {1}{3}+c_2\right ) t^2+\frac {c_1}{t}+\frac {1}{2} \]
Sympy. Time used: 0.225 (sec). Leaf size: 20
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(t**2*Derivative(y(t), (t, 2)) - 3*t**2 - 2*y(t) + 1,0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \frac {C_{1} + C_{2} t^{3} + t^{3} \log {\left (t \right )} + \frac {t}{2}}{t} \]