1.4.22 problem 22

Internal problem ID [94]
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.5 (linear equations). Problems at page 54
Problem number : 22
Date solved : Tuesday, September 30, 2025 at 03:43:09 AM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (0\right )&=5 \\ \end{align*}
Maple. Time used: 0.031 (sec). Leaf size: 14
ode:=diff(y(x),x) = 2*x*y(x)+3*x^2*exp(x^2); 
ic:=[y(0) = 5]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \left (x^{3}+5\right ) {\mathrm e}^{x^{2}} \]
Mathematica. Time used: 0.035 (sec). Leaf size: 16
ode=D[y[x],x]==2*x*y[x]+3*x^2*Exp[x^2]; 
ic={y[0]==5}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{x^2} \left (x^3+5\right ) \end{align*}
Sympy. Time used: 0.153 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*x**2*exp(x**2) - 2*x*y(x) + Derivative(y(x), x),0) 
ics = {y(0): 5} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (x^{3} + 5\right ) e^{x^{2}} \]