23.1.511 problem 501

Internal problem ID [5118]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 501
Date solved : Tuesday, September 30, 2025 at 11:41:18 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} \left (3+9 x +21 y\right ) y^{\prime }&=45+7 x -5 y \end{align*}
Maple. Time used: 0.192 (sec). Leaf size: 212
ode:=(3+9*x+21*y(x))*diff(y(x),x) = 45+7*x-5*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (-x -5\right ) {\operatorname {RootOf}\left (-27+\left (c_1 \,x^{7}+35 c_1 \,x^{6}+525 c_1 \,x^{5}+4375 c_1 \,x^{4}+21875 c_1 \,x^{3}+65625 c_1 \,x^{2}+109375 c_1 x +78125 c_1 \right ) \textit {\_Z}^{49}+\left (-12 c_1 \,x^{7}-420 c_1 \,x^{6}-6300 c_1 \,x^{5}-52500 c_1 \,x^{4}-262500 c_1 \,x^{3}-787500 c_1 \,x^{2}-1312500 c_1 x -937500 c_1 \right ) \textit {\_Z}^{42}+\left (48 c_1 \,x^{7}+1680 c_1 \,x^{6}+25200 c_1 \,x^{5}+210000 c_1 \,x^{4}+1050000 c_1 \,x^{3}+3150000 c_1 \,x^{2}+5250000 c_1 x +3750000 c_1 \right ) \textit {\_Z}^{35}+\left (-64 c_1 \,x^{7}-2240 c_1 \,x^{6}-33600 c_1 \,x^{5}-280000 c_1 \,x^{4}-1400000 c_1 \,x^{3}-4200000 c_1 \,x^{2}-7000000 c_1 x -5000000 c_1 \right ) \textit {\_Z}^{28}\right )}^{7}}{3}+\frac {x}{3}+\frac {11}{3} \]
Mathematica. Time used: 60.641 (sec). Leaf size: 7785
ode=(3+9*x+21*y[x])*D[y[x],x]==45 +7*x-5*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Too large to display

Sympy. Time used: 1.065 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-7*x + (9*x + 21*y(x) + 3)*Derivative(y(x), x) + 5*y(x) - 45,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (y{\left (x \right )} - 2 \right )} = C_{1} - \log {\left (\left (\frac {x + 5}{y{\left (x \right )} - 2} - 3\right )^{\frac {4}{7}} \left (\frac {x + 5}{y{\left (x \right )} - 2} + 1\right )^{\frac {3}{7}} \right )} \]