67.2.38 problem Problem 18(c)

Internal problem ID [13916]
Book : APPLIED DIFFERENTIAL EQUATIONS The Primary Course by Vladimir A. Dobrushkin. CRC Press 2015
Section : Chapter 4, Second and Higher Order Linear Differential Equations. Problems page 221
Problem number : Problem 18(c)
Date solved : Wednesday, March 05, 2025 at 10:22:11 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.001 (sec). Leaf size: 85
ode:=diff(diff(y(x),x),x)+2*x^2*diff(y(x),x)+4*x*y(x) = 2*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {4 x \sqrt {3}\, \pi c_{1} {\mathrm e}^{-\frac {2 x^{3}}{3}}-6 x \Gamma \left (\frac {1}{3}, -\frac {2 x^{3}}{3}\right ) c_{1} \Gamma \left (\frac {2}{3}\right ) {\mathrm e}^{-\frac {2 x^{3}}{3}}+\left (-x^{3}\right )^{{1}/{3}}+2 c_{2} \left (-x^{3}\right )^{{1}/{3}} {\mathrm e}^{-\frac {2 x^{3}}{3}}-\left (-x^{3}\right )^{{1}/{3}} {\mathrm e}^{-\frac {2 x^{3}}{3}}}{2 \left (-x^{3}\right )^{{1}/{3}}} \]
Mathematica. Time used: 0.09 (sec). Leaf size: 66
ode=D[y[x],{x,2}]+2*x^2*D[y[x],x]+4*x*y[x]==2*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to c_2 e^{-\frac {2 x^3}{3}}+\frac {c_1 e^{-\frac {2 x^3}{3}} \left (-x^3\right )^{2/3} \Gamma \left (\frac {1}{3},-\frac {2 x^3}{3}\right )}{\sqrt [3]{2} 3^{2/3} x^2}+\frac {1}{2} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x**2*Derivative(y(x), x) + 4*x*y(x) - 2*x + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (x*(1 - 2*y(x)) - Derivative(y(x), (x, 2))/2)/x**2 cannot be solved by the factorable group method