29.3.13 problem 13

Internal problem ID [7252]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 3. Linear First-Order Equations. page 403
Problem number : 13
Date solved : Tuesday, September 30, 2025 at 04:26:14 PM
CAS classification : [[_linear, `class A`]]

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