60.1.2 problem 2

Internal problem ID [10016]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 2
Date solved : Sunday, March 30, 2025 at 02:53:37 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+a y-c \,{\mathrm e}^{b x}&=0 \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 23
ode:=diff(y(x),x)+a*y(x)-c*exp(b*x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-a x} c_1 +\frac {{\mathrm e}^{b x} c}{a +b} \]
Mathematica. Time used: 0.064 (sec). Leaf size: 33
ode=D[y[x],x]+ a*y[x] - c*Exp[b*x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {e^{-a x} \left (c e^{x (a+b)}+c_1 (a+b)\right )}{a+b} \]
Sympy. Time used: 0.150 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
y = Function("y") 
ode = Eq(a*y(x) - c*exp(b*x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- a x} + \frac {c e^{b x}}{a + b} \]