29.9.2 problem 242

Internal problem ID [4842]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 9
Problem number : 242
Date solved : Sunday, March 30, 2025 at 04:03:27 AM
CAS classification : [_linear]

\begin{align*} \left (1-2 x \right ) y^{\prime }&=16+32 x -6 y \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 18
ode:=(1-2*x)*diff(y(x),x) = 16+32*x-6*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {4}{3}+8 x +\left (-1+2 x \right )^{3} c_1 \]
Mathematica. Time used: 0.049 (sec). Leaf size: 22
ode=(1-2 x)D[y[x],x]==2(8+16 x-3 y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 8 x+c_1 (2 x-1)^3+\frac {4}{3} \]
Sympy. Time used: 0.421 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-32*x + (1 - 2*x)*Derivative(y(x), x) + 6*y(x) - 16,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 8 C_{1} x^{3} - 12 C_{1} x^{2} + 6 C_{1} x - C_{1} + 8 x + \frac {4}{3} \]