63.3.8 problem 7

Internal problem ID [12964]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 1, First order differential equations. Section 1.2 Antiderivatives. Exercises page 19
Problem number : 7
Date solved : Wednesday, March 05, 2025 at 08:55:02 PM
CAS classification : [[_2nd_order, _missing_y]]

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

With initial conditions

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

Maple. Time used: 0.007 (sec). Leaf size: 9
ode:=diff(x(t),t)+t*diff(diff(x(t),t),t) = 1; 
ic:=x(1) = 0, D(x)(1) = 2; 
dsolve([ode,ic],x(t), singsol=all);
 
\[ x \left (t \right ) = \ln \left (t \right )+t -1 \]
Mathematica. Time used: 0.018 (sec). Leaf size: 10
ode=D[t*D[x[t],t],t]==1; 
ic={x[1]==0,Derivative[1][x][1 ]==2}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to t+\log (t)-1 \]
Sympy. Time used: 0.185 (sec). Leaf size: 8
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(t*Derivative(x(t), (t, 2)) + Derivative(x(t), t) - 1,0) 
ics = {x(1): 0, Subs(Derivative(x(t), t), t, 1): 2} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = t + \log {\left (t \right )} - 1 \]