64.5.21 problem 21

Internal problem ID [13263]
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 : Monday, March 31, 2025 at 07:44:12 AM
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.019 (sec). Leaf size: 10
ode:=exp(x)*(y(x)-3*(exp(x)+1)^2)+(exp(x)+1)*diff(y(x),x) = 0; 
ic:=y(0) = 4; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \left ({\mathrm e}^{x}+1\right )^{2} \]
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} \]