57.1.8 problem 8

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

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

Maple. Time used: 0.001 (sec). Leaf size: 26
ode:=diff(y(x),x) = a*x+b*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{b x} c_{1} b^{2}-a x b -a}{b^{2}} \]
Mathematica. Time used: 0.059 (sec). Leaf size: 25
ode=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+a}{b^2}+c_1 e^{b x} \]
Sympy. Time used: 0.128 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-a*x - b*y(x) + 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}} \]