19.2.13 problem 13

Internal problem ID [3542]
Book : Differential equations and linear algebra, Stephen W. Goode, second edition, 2000
Section : 1.6, page 50
Problem number : 13
Date solved : Sunday, March 30, 2025 at 01:46:48 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+\alpha y&={\mathrm e}^{\beta x} \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 22
ode:=diff(y(x),x)+alpha*y(x) = exp(beta*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-\alpha x} c_1 +\frac {{\mathrm e}^{\beta x}}{\alpha +\beta } \]
Mathematica. Time used: 0.066 (sec). Leaf size: 31
ode=D[y[x],x]+\[Alpha]*y[x]==Exp[\[Beta]*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {e^{\alpha (-x)} \left (e^{x (\alpha +\beta )}+c_1 (\alpha +\beta )\right )}{\alpha +\beta } \]
Sympy. Time used: 0.140 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
Alpha = symbols("Alpha") 
BETA = symbols("BETA") 
y = Function("y") 
ode = Eq(Alpha*y(x) - exp(BETA*x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- \mathrm {A} x} + \frac {e^{\beta x}}{\mathrm {A} + \beta } \]