50.7.7 problem 1(g)

Internal problem ID [7911]
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.9. Reduction of Order. Page 38
Problem number : 1(g)
Date solved : Wednesday, March 05, 2025 at 05:17:14 AM
CAS classification : [[_2nd_order, _missing_y]]

\begin{align*} x y^{\prime \prime }+y^{\prime }&=4 x \end{align*}

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