50.3.24 problem 6

Internal problem ID [7848]
Book : Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section : Chapter 1. What is a differential equation. Section 1.4 First Order Linear Equations. Page 15
Problem number : 6
Date solved : Wednesday, March 05, 2025 at 05:08:28 AM
CAS classification : [_separable]

\begin{align*} x y^{\prime }&=2 x^{2} y+y \ln \left (x \right ) \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 17
ode:=x*diff(y(x),x) = 2*x^2*y(x)+y(x)*ln(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_{1} {\mathrm e}^{\frac {\ln \left (x \right )^{2}}{2}+x^{2}} \]
Mathematica. Time used: 0.039 (sec). Leaf size: 27
ode=x*D[y[x],x]==2*x^2*y[x]+y[x]*Log[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to c_1 e^{x^2+\frac {\log ^2(x)}{2}} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.378 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x**2*y(x) + x*Derivative(y(x), x) - y(x)*log(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{x^{2} + \frac {\log {\left (x \right )}^{2}}{2}} \]