39.3.6 problem Problem 12.6

Internal problem ID [6532]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 12. VARIATION OF PARAMETERS. page 104
Problem number : Problem 12.6
Date solved : Wednesday, March 05, 2025 at 12:55:58 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.004 (sec). Leaf size: 24
ode:=t^2*diff(diff(N(t),t),t)-2*t*diff(N(t),t)+2*N(t) = t*ln(t); 
dsolve(ode,N(t), singsol=all);
 
\[ N = -\frac {t \left (\ln \left (t \right )^{2}-2 c_1 t +2 \ln \left (t \right )-2 c_2 +2\right )}{2} \]
Mathematica. Time used: 0.021 (sec). Leaf size: 30
ode=t^2*D[ n[t],{t,2}]-2*t*D[ n[t],t]+2*n[t]==t*Log[t]; 
ic={}; 
DSolve[{ode,ic},n[t],t,IncludeSingularSolutions->True]
 
\[ n(t)\to -\frac {1}{2} t \log ^2(t)-t \log (t)+t (c_2 t-1+c_1) \]
Sympy. Time used: 0.305 (sec). Leaf size: 20
from sympy import * 
t = symbols("t") 
n = Function("n") 
ode = Eq(t**2*Derivative(n(t), (t, 2)) - t*log(t) - 2*t*Derivative(n(t), t) + 2*n(t),0) 
ics = {} 
dsolve(ode,func=n(t),ics=ics)
 
\[ n{\left (t \right )} = \frac {t \left (C_{1} + C_{2} t - \log {\left (t \right )}^{2} - 2 \log {\left (t \right )}\right )}{2} \]