64.5.21 problem 21

Internal problem ID [13255]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.3 (Linear equations). Exercises page 56
Problem number : 21
Date solved : Wednesday, March 05, 2025 at 09:31:49 PM
CAS classification : [_linear]

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

With initial conditions

\begin{align*} y \left (0\right )&=4 \end{align*}

Maple. Time used: 0.013 (sec). Leaf size: 14
ode:=exp(x)*(y(x)-3*(1+exp(x))^2)+(1+exp(x))*diff(y(x),x) = 0; 
ic:=y(0) = 4; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = {\mathrm e}^{2 x}+2 \,{\mathrm e}^{x}+1 \]
Mathematica. Time used: 0.085 (sec). Leaf size: 12
ode=Exp[x]*(y[x]-3*(Exp[x]+1)^2)+(Exp[x]+1)*D[y[x],x]==0; 
ic={y[0]==4}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \left (e^x+1\right )^2 \]
Sympy. Time used: 0.401 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-3*(exp(x) + 1)**2 + y(x))*exp(x) + (exp(x) + 1)*Derivative(y(x), x),0) 
ics = {y(0): 4} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {e^{3 x} + 3 e^{2 x} + 3 e^{x} + 1}{e^{x} + 1} \]