65.10.4 problem 17.4

Internal problem ID [13708]
Book : AN INTRODUCTION TO ORDINARY DIFFERENTIAL EQUATIONS by JAMES C. ROBINSON. Cambridge University Press 2004
Section : Chapter 17, Reduction of order. Exercises page 162
Problem number : 17.4
Date solved : Wednesday, March 05, 2025 at 10:13:23 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (-t^{2}+t \right ) x^{\prime \prime }+\left (-t^{2}+2\right ) x^{\prime }+\left (2-t \right ) x&=0 \end{align*}

Using reduction of order method given that one solution is

\begin{align*} x&={\mathrm e}^{-t} \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 17
ode:=(-t^2+t)*diff(diff(x(t),t),t)+(-t^2+2)*diff(x(t),t)+(-t+2)*x(t) = 0; 
dsolve(ode,x(t), singsol=all);
 
\[ x \left (t \right ) = \frac {c_{2} {\mathrm e}^{-t} t +c_{1}}{t} \]
Mathematica. Time used: 0.224 (sec). Leaf size: 96
ode=(t-t^2)*D[x[t],{t,2}]+(2-t^2)*D[x[t],t]+(2-t)*x[t]==0; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to \exp \left (\int _1^t\frac {K[1]-2}{2 (K[1]-1)}dK[1]-\frac {1}{2} \int _1^t\left (\frac {2}{K[2]}+1+\frac {1}{1-K[2]}\right )dK[2]\right ) \left (c_2 \int _1^t\exp \left (-2 \int _1^{K[3]}\frac {K[1]-2}{2 (K[1]-1)}dK[1]\right )dK[3]+c_1\right ) \]
Sympy. Time used: 0.790 (sec). Leaf size: 10
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq((2 - t)*x(t) + (2 - t**2)*Derivative(x(t), t) + (-t**2 + t)*Derivative(x(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {C_{2}}{t} + C_{1} + O\left (t^{6}\right ) \]