28.1.19 problem 19

Internal problem ID [4325]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 19
Date solved : Sunday, March 30, 2025 at 03:00:01 AM
CAS classification : [[_homogeneous, `class C`], _Riccati]

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

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