88.9.5 problem 5

Internal problem ID [24025]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 2. Differential equations of first order. Exercise at page 48
Problem number : 5
Date solved : Thursday, October 02, 2025 at 09:54:32 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }+x^{2} y&=\left (x^{2}+1\right ) {\mathrm e}^{x} \end{align*}
Maple. Time used: 0.000 (sec). Leaf size: 15
ode:=diff(y(x),x)+x^2*y(x) = (x^2+1)*exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-\frac {x^{3}}{3}} c_1 +{\mathrm e}^{x} \]
Mathematica. Time used: 0.071 (sec). Leaf size: 21
ode=D[y[x],{x,1}] +x^2*y[x]==(1+x^2)*Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^x+c_1 e^{-\frac {x^3}{3}} \end{align*}
Sympy. Time used: 0.186 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*y(x) - (x**2 + 1)*exp(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- \frac {x^{3}}{3}} + e^{x} \]