57.1.16 problem 16

Internal problem ID [9000]
Book : First order enumerated odes
Section : section 1
Problem number : 16
Date solved : Wednesday, March 05, 2025 at 07:14:05 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} c y^{\prime }&=a x +b y \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 29
ode:=c*diff(y(x),x) = a*x+b*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{\frac {b x}{c}} c_{1} b^{2}-a \left (b x +c \right )}{b^{2}} \]
Mathematica. Time used: 0.062 (sec). Leaf size: 28
ode=c*D[y[x],x]==a*x+b*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {a (b x+c)}{b^2}+c_1 e^{\frac {b x}{c}} \]
Sympy. Time used: 0.160 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
ode = Eq(-a*x - b*y(x) + c*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{\frac {b x}{c}} - \frac {a x}{b} - \frac {a c}{b^{2}} \]