32.1.5 problem 5

Internal problem ID [7710]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 24. First order differential equations. Test excercise 24. page 1067
Problem number : 5
Date solved : Tuesday, September 30, 2025 at 04:56:24 PM
CAS classification : [_quadrature]

\begin{align*} x^{2} y^{\prime }&=x^{3} \sin \left (3 x \right )+4 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 24
ode:=x^2*diff(y(x),x) = x^3*sin(3*x)+4; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\sin \left (3 x \right )}{9}-\frac {x \cos \left (3 x \right )}{3}-\frac {4}{x}+c_1 \]
Mathematica. Time used: 0.015 (sec). Leaf size: 30
ode=x^2*D[y[x],x]==x^3*Sin[3*x]+4; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \int _1^x\left (K[1] \sin (3 K[1])+\frac {4}{K[1]^2}\right )dK[1]+c_1 \end{align*}
Sympy. Time used: 0.196 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3*sin(3*x) + x**2*Derivative(y(x), x) - 4,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} - \frac {x \cos {\left (3 x \right )}}{3} + \frac {\sin {\left (3 x \right )}}{9} - \frac {4}{x} \]