89.5.14 problem 14

Internal problem ID [24364]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 2. Equations of the first order and first degree. Exercises at page 43
Problem number : 14
Date solved : Thursday, October 02, 2025 at 10:22:13 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }-m_{2} y&=c \,{\mathrm e}^{m_{1} x} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 24
ode:=diff(y(x),x)-m__2*y(x) = c*exp(m__1*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{m_{2} x} c_1 +\frac {{\mathrm e}^{m_{1} x} c}{m_{1} -m_{2}} \]
Mathematica. Time used: 0.043 (sec). Leaf size: 32
ode=D[y[x],x]-m2*y[x]== c*Exp[m1*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{\text {m2} x} \left (\frac {c e^{x (\text {m1}-\text {m2})}}{\text {m1}-\text {m2}}+c_1\right ) \end{align*}
Sympy. Time used: 0.096 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
m1 = symbols("m1") 
m2 = symbols("m2") 
c = symbols("c") 
y = Function("y") 
ode = Eq(-c*exp(m1*x) - m2*y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{m_{2} x} + \frac {c e^{m_{1} x}}{m_{1} - m_{2}} \]