32.5.16 problem Exercise 11.17, page 97

Internal problem ID [5854]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 11, Bernoulli Equations
Problem number : Exercise 11.17, page 97
Date solved : Sunday, March 30, 2025 at 10:19:50 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 12
ode:=-y(x)+x*diff(y(x),x) = x^2*sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-\cos \left (x \right )+c_1 \right ) x \]
Mathematica. Time used: 0.038 (sec). Leaf size: 14
ode=x*D[y[x],x]-y[x]==x^2*Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x (-\cos (x)+c_1) \]
Sympy. Time used: 0.283 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*sin(x) + x*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \left (C_{1} - \cos {\left (x \right )}\right ) \]