30.2.6 problem 6

Internal problem ID [7434]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.3, Linear equations. Exercises. page 54
Problem number : 6
Date solved : Tuesday, September 30, 2025 at 04:35:16 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} 3 r&=r^{\prime }-\theta ^{3} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 25
ode:=3*r(theta) = diff(r(theta),theta)-theta^3; 
dsolve(ode,r(theta), singsol=all);
 
\[ r = -\frac {\theta ^{2}}{3}-\frac {\theta ^{3}}{3}-\frac {2 \theta }{9}-\frac {2}{27}+{\mathrm e}^{3 \theta } c_1 \]
Mathematica. Time used: 0.05 (sec). Leaf size: 32
ode=3*r[\[Theta]]==D[ r[\[Theta]], \[Theta] ]-\[Theta]^3; 
ic={}; 
DSolve[{ode,ic},r[\[Theta]],\[Theta],IncludeSingularSolutions->True]
 
\begin{align*} r(\theta )&\to e^{3 \theta } \left (\int _1^{\theta }e^{-3 K[1]} K[1]^3dK[1]+c_1\right ) \end{align*}
Sympy. Time used: 0.091 (sec). Leaf size: 27
from sympy import * 
theta = symbols("theta") 
r = Function("r") 
ode = Eq(theta**3 + 3*r(theta) - Derivative(r(theta), theta),0) 
ics = {} 
dsolve(ode,func=r(theta),ics=ics)
 
\[ r{\left (\theta \right )} = C_{1} e^{3 \theta } - \frac {\theta ^{3}}{3} - \frac {\theta ^{2}}{3} - \frac {2 \theta }{9} - \frac {2}{27} \]