86.3.13 problem 11

Internal problem ID [23104]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 4. Linear equations of the first order. Exercise 4a at page 56
Problem number : 11
Date solved : Thursday, October 02, 2025 at 09:21:57 PM
CAS classification : [_separable]

\begin{align*} \left (1+{\mathrm e}^{x}\right ) y^{\prime }+y \,{\mathrm e}^{x}&={\mathrm e}^{x} \end{align*}

With initial conditions

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