73.4.5 problem 5.1 (e)

Internal problem ID [15016]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 5. LINEAR FIRST ORDER EQUATIONS. Additional exercises. page 103
Problem number : 5.1 (e)
Date solved : Monday, March 31, 2025 at 01:12:30 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 35
ode:=diff(y(x),x) = 1+x*y(x)+3*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\sqrt {\pi }\, {\mathrm e}^{\frac {9}{2}} \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, \left (x +3\right )}{2}\right )+2 c_1 \right ) {\mathrm e}^{\frac {x \left (x +6\right )}{2}}}{2} \]
Mathematica. Time used: 0.032 (sec). Leaf size: 38
ode=D[y[x],x]==1+x*y[x]+3*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{\frac {1}{2} x (x+6)} \left (\int _1^xe^{-\frac {1}{2} K[1] (K[1]+6)}dK[1]+c_1\right ) \]
Sympy. Time used: 0.660 (sec). Leaf size: 49
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*y(x) - 3*y(x) + Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{x \left (\frac {x}{2} + 3\right )} + \frac {\sqrt {2} \sqrt {\pi } e^{\frac {x^{2}}{2} + 3 x + \frac {9}{2}} \operatorname {erf}{\left (\frac {\sqrt {2} \left (x + 3\right )}{2} \right )}}{2} \]