12.2.40 problem 48(c)

Internal problem ID [1576]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Linear first order. Section 2.1 Page 41
Problem number : 48(c)
Date solved : Tuesday, March 04, 2025 at 12:40:23 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(x)*y+H(x)]`]]

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

Maple. Time used: 0.008 (sec). Leaf size: 16
ode:=x*diff(y(x),x)/y(x)+2*ln(y(x)) = 4*x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\frac {x^{4}-c_1}{x^{2}}} \]
Mathematica. Time used: 0.207 (sec). Leaf size: 17
ode=x*D[y[x],x]/y[x]+2*Log[y[x]]== 4*x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{x^2+\frac {c_1}{x^2}} \]
Sympy. Time used: 0.995 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*x**2 + x*Derivative(y(x), x)/y(x) + 2*log(y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = e^{\frac {C_{1} + x^{4}}{x^{2}}} \]