57.1.15 problem 15

Internal problem ID [8999]
Book : First order enumerated odes
Section : section 1
Problem number : 15
Date solved : Wednesday, March 05, 2025 at 07:14:04 AM
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} -\left (c +x \right ) a \]
Mathematica. Time used: 0.056 (sec). Leaf size: 22
ode=c*D[y[x],x]==a*x+y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -a (c+x)+c_1 e^{\frac {x}{c}} \]
Sympy. Time used: 0.144 (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 \]