28.2.65 problem 65

Internal problem ID [4508]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 4. Linear Differential Equations. Page 183
Problem number : 65
Date solved : Tuesday, March 04, 2025 at 06:49:32 PM
CAS classification : [[_2nd_order, _missing_y]]

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

Maple. Time used: 0.003 (sec). Leaf size: 30
ode:=diff(diff(y(x),x),x)+diff(y(x),x) = 1/(1+exp(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \left (-{\mathrm e}^{-x}-1\right ) \ln \left (1+{\mathrm e}^{x}\right )-{\mathrm e}^{-x} c_{1} +c_{2} +\ln \left ({\mathrm e}^{x}\right ) \]
Mathematica. Time used: 0.085 (sec). Leaf size: 33
ode=D[y[x],{x,2}]+D[y[x],x]==1/(Exp[x]+1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x-\log \left (e^x+1\right )-e^{-x} \left (\log \left (e^x+1\right )+c_1\right )+c_2 \]
Sympy. Time used: 0.491 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 1/(exp(x) + 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} e^{- x} + x - \log {\left (e^{x} + 1 \right )} - e^{- x} \log {\left (e^{x} + 1 \right )} \]