57.4.16 problem 6

Internal problem ID [14340]
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.3.1 Separable equations. Exercises page 26
Problem number : 6
Date solved : Thursday, October 02, 2025 at 09:31:52 AM
CAS classification : [[_homogeneous, `class C`], _Riccati]

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

With initial conditions

\begin{align*} x \left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.132 (sec). Leaf size: 28
ode:=diff(x(t),t) = (4*t-x(t))^2; 
ic:=[x(0) = 1]; 
dsolve([ode,op(ic)],x(t), singsol=all);
 
\[ x = \frac {\left (4 t -2\right ) {\mathrm e}^{4 t}+12 t +6}{3+{\mathrm e}^{4 t}} \]
Mathematica. Time used: 0.11 (sec). Leaf size: 31
ode=D[x[t],t]==(4*t-x[t])^2; 
ic={x[0]==1}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {12 t+e^{4 t} (4 t-2)+6}{e^{4 t}+3} \end{align*}
Sympy. Time used: 0.191 (sec). Leaf size: 31
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-(4*t - x(t))**2 + Derivative(x(t), t),0) 
ics = {x(0): 1} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {2 \left (- 2 t e^{4 t} - 6 t + e^{4 t} - 3\right )}{- e^{4 t} - 3} \]