89.7.25 problem 24

Internal problem ID [24456]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 4. Additional topics on equations of first order and first degree. Exercises at page 61
Problem number : 24
Date solved : Thursday, October 02, 2025 at 10:37:05 PM
CAS classification : [[_homogeneous, `class C`], _Riccati]

\begin{align*} y^{\prime }&=2 \left (3 x +y\right )^{2}-1 \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.029 (sec). Leaf size: 16
ode:=diff(y(x),x) = 2*(3*x+y(x))^2-1; 
ic:=[y(0) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -3 x +\tan \left (2 x +\frac {\pi }{4}\right ) \]
Mathematica. Time used: 0.101 (sec). Leaf size: 42
ode=D[y[x],x]==2*(3*x+y[x])^2-1; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {3 i x-e^{4 i x} (3 x+i)+1}{e^{4 i x}-i} \end{align*}
Sympy. Time used: 0.193 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*(3*x + y(x))**2 + Derivative(y(x), x) + 1,0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {3 x e^{4 i x} - 3 i x + i e^{4 i x} - 1}{- e^{4 i x} + i} \]