83.43.11 problem Ex 12 page 14

Internal problem ID [19448]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Book Solved Excercises. Chapter II. Equations of first order and first degree
Problem number : Ex 12 page 14
Date solved : Monday, March 31, 2025 at 07:15:00 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }+2 x y&={\mathrm e}^{-x^{2}} \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 14
ode:=diff(y(x),x)+2*x*y(x) = exp(-x^2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (x +c_1 \right ) {\mathrm e}^{-x^{2}} \]
Mathematica. Time used: 0.059 (sec). Leaf size: 17
ode=D[y[x],x]+2*x*y[x]==Exp[-x^2]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-x^2} (x+c_1) \]
Sympy. Time used: 0.211 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*y(x) + Derivative(y(x), x) - exp(-x**2),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + x\right ) e^{- x^{2}} \]