75.6.1 problem 125

Internal problem ID [16686]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 6. Linear equations of the first order. The Bernoulli equation. Exercises page 54
Problem number : 125
Date solved : Monday, March 31, 2025 at 03:05:32 PM
CAS classification : [[_linear, `class A`]]

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

Maple. Time used: 0.002 (sec). Leaf size: 13
ode:=diff(y(x),x)+2*y(x) = exp(-x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left ({\mathrm e}^{x}+c_1 \right ) {\mathrm e}^{-2 x} \]
Mathematica. Time used: 0.051 (sec). Leaf size: 17
ode=D[y[x],x]+2*y[x]==Exp[-x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-2 x} \left (e^x+c_1\right ) \]
Sympy. Time used: 0.140 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) + Derivative(y(x), x) - exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} e^{- x} + 1\right ) e^{- x} \]