63.13.2 problem 2

Internal problem ID [13094]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 2, Second order linear equations. Section 2.4.3 Reduction of order. Exercises page 125
Problem number : 2
Date solved : Wednesday, March 05, 2025 at 09:17:17 PM
CAS classification : [_Hermite]

\begin{align*} x^{\prime \prime }-t x^{\prime }+x&=0 \end{align*}

Using reduction of order method given that one solution is

\begin{align*} x&=t \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 37
ode:=diff(diff(x(t),t),t)-t*diff(x(t),t)+x(t) = 0; 
dsolve(ode,x(t), singsol=all);
 
\[ x \left (t \right ) = i \sqrt {2}\, \sqrt {\pi }\, {\mathrm e}^{\frac {t^{2}}{2}} c_{2} -t \left (\operatorname {erf}\left (\frac {i \sqrt {2}\, t}{2}\right ) \pi c_{2} -c_{1} \right ) \]
Mathematica. Time used: 0.049 (sec). Leaf size: 61
ode=D[x[t],{t,2}]-t*D[x[t],t]+x[t]==0; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to -\sqrt {\frac {\pi }{2}} c_2 \sqrt {t^2} \text {erfi}\left (\frac {\sqrt {t^2}}{\sqrt {2}}\right )+c_2 e^{\frac {t^2}{2}}+\sqrt {2} c_1 t \]
Sympy. Time used: 0.771 (sec). Leaf size: 22
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-t*Derivative(x(t), t) + x(t) + Derivative(x(t), (t, 2)),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = C_{2} \left (- \frac {t^{4}}{24} - \frac {t^{2}}{2} + 1\right ) + C_{1} t + O\left (t^{6}\right ) \]