51.1.15 problem 15

Internal problem ID [10285]
Book : First order enumerated odes
Section : section 1
Problem number : 15
Date solved : Tuesday, September 30, 2025 at 07:17:16 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} c y^{\prime }&=a x +y \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 19
ode:=c*diff(y(x),x) = a*x+y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\frac {x}{c}} c_1 -a \left (c +x \right ) \]
Mathematica. Time used: 0.04 (sec). Leaf size: 39
ode=c*D[y[x],x]==a*x+y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{\frac {x}{c}} \left (\int _1^x\frac {a e^{-\frac {K[1]}{c}} K[1]}{c}dK[1]+c_1\right ) \end{align*}
Sympy. Time used: 0.087 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
a = symbols("a") 
c = symbols("c") 
y = Function("y") 
ode = Eq(-a*x + c*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{\frac {x}{c}} - a c - a x \]