20.4.38 problem Problem 55

Internal problem ID [3673]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.8, Change of Variables. page 79
Problem number : Problem 55
Date solved : Sunday, March 30, 2025 at 02:04:04 AM
CAS classification : [[_homogeneous, `class C`], _Riccati]

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

Maple. Time used: 0.005 (sec). Leaf size: 19
ode:=diff(y(x),x) = (4*x+y(x)+2)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -4 x -2-2 \tan \left (-2 x +2 c_1 \right ) \]
Mathematica. Time used: 0.172 (sec). Leaf size: 41
ode=D[y[x],x]==(4*x+y[x]+2)^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -4 x+\frac {1}{c_1 e^{4 i x}-\frac {i}{4}}-(2+2 i) \\ y(x)\to -4 x-(2+2 i) \\ \end{align*}
Sympy. Time used: 0.357 (sec). Leaf size: 44
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(4*x + y(x) + 2)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {- 4 C_{1} x + C_{1} \left (-2 + 2 i\right ) + 4 x e^{4 i x} + \left (2 + 2 i\right ) e^{4 i x}}{C_{1} - e^{4 i x}} \]