84.17.4 problem 10.1 (d)

Internal problem ID [22196]
Book : Schaums outline series. Differential Equations By Richard Bronson. 1973. McGraw-Hill Inc. ISBN 0-07-008009-7
Section : Chapter 10. Linear differential equations. General remarks. Solved problems. Page 54
Problem number : 10.1 (d)
Date solved : Thursday, October 02, 2025 at 08:33:59 PM
CAS classification : [_linear]

\begin{align*} 3 y^{\prime }+y x&={\mathrm e}^{-x^{2}} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 30
ode:=3*diff(y(x),x)+x*y(x) = exp(-x^2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\sqrt {\pi }\, \sqrt {30}\, \operatorname {erf}\left (\frac {\sqrt {30}\, x}{6}\right )+30 c_1 \right ) {\mathrm e}^{-\frac {x^{2}}{6}}}{30} \]
Mathematica. Time used: 0.064 (sec). Leaf size: 41
ode=3*D[y[x],x]+x*y[x]==Exp[-x^2]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{30} e^{-\frac {x^2}{6}} \left (\sqrt {30 \pi } \text {erf}\left (\sqrt {\frac {5}{6}} x\right )+30 c_1\right ) \end{align*}
Sympy. Time used: 0.262 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x) + 3*Derivative(y(x), x) - exp(-x**2),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + \frac {\sqrt {30} \sqrt {\pi } \operatorname {erf}{\left (\frac {\sqrt {30} x}{6} \right )}}{30}\right ) e^{- \frac {x^{2}}{6}} \]