7.3.25 problem 25

Internal problem ID [65]
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 : 25
Date solved : Tuesday, March 04, 2025 at 10:41:23 AM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (1\right )&=1 \end{align*}

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