74.2.12 problem 17

Internal problem ID [15774]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 1. Introduction to Differential Equations. Review exercises, page 23
Problem number : 17
Date solved : Thursday, March 13, 2025 at 06:19:34 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.000 (sec). Leaf size: 22
ode:=diff(y(x),x) = x^2*sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\cos \left (x \right ) x^{2}+2 \cos \left (x \right )+2 x \sin \left (x \right )+c_{1} \]
Mathematica. Time used: 0.011 (sec). Leaf size: 23
ode=D[y[x],x]==x^2*Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \int _1^xK[1]^2 \sin (K[1])dK[1]+c_1 \]
Sympy. Time used: 0.164 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*sin(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} - x^{2} \cos {\left (x \right )} + 2 x \sin {\left (x \right )} + 2 \cos {\left (x \right )} \]