7.3.1 problem 1

Internal problem ID [41]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.4 (separable equations). Problems at page 43
Problem number : 1
Date solved : Saturday, March 29, 2025 at 04:27:14 PM
CAS classification : [_separable]

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

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