15.6.5 problem 5

Internal problem ID [2962]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 10, page 41
Problem number : 5
Date solved : Tuesday, March 04, 2025 at 03:36:07 PM
CAS classification : [[_linear, `class A`]]

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

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