75.4.15 problem 60

Internal problem ID [16646]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 4. Equations with variables separable and equations reducible to them. Exercises page 38
Problem number : 60
Date solved : Monday, March 31, 2025 at 03:03:15 PM
CAS classification : [[_linear, `class A`]]

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

Maple. Time used: 0.002 (sec). Leaf size: 31
ode:=diff(y(x),x) = a*x+b*y(x)+c; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{b x} c_1 \,b^{2}+\left (-a x -c \right ) b -a}{b^{2}} \]
Mathematica. Time used: 0.111 (sec). Leaf size: 35
ode=D[y[x],x]==a*x+b*y[x]+c; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{b x} \left (\int _1^xe^{-b K[1]} (c+a K[1])dK[1]+c_1\right ) \]
Sympy. Time used: 0.145 (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^{b x} - \frac {a x}{b} - \frac {a}{b^{2}} - \frac {c}{b} \]