64.1.8 problem 3(b)

Internal problem ID [13182]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 1, Differential equations and their solutions. Exercises page 13
Problem number : 3(b)
Date solved : Monday, March 31, 2025 at 07:36:25 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }+4 x y&=8 x \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=diff(y(x),x)+4*x*y(x) = 8*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = 2+{\mathrm e}^{-2 x^{2}} c_1 \]
Mathematica. Time used: 0.052 (sec). Leaf size: 22
ode=D[y[x],x]+4*x*y[x]==8*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 2+c_1 e^{-2 x^2} \\ y(x)\to 2 \\ \end{align*}
Sympy. Time used: 0.289 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*x*y(x) - 8*x + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 2 x^{2}} + 2 \]