14.5.1 problem 1

Internal problem ID [2538]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 1. First order differential equations. Section 1.17. What to do in practice. Excercises page 126
Problem number : 1
Date solved : Sunday, March 30, 2025 at 12:09:28 AM
CAS classification : [`y=_G(x,y')`]

\begin{align*} y^{\prime }&=y+{\mathrm e}^{-y}+2 t \end{align*}

With initial conditions

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

Maple
ode:=diff(y(t),t) = y(t)+exp(-y(t))+2*t; 
ic:=y(0) = 0; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ \text {No solution found} \]
Mathematica
ode=D[y[t],t]==y[t]+Exp[-y[t]]+2*t; 
ic={y[0]==0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 

Not solved

Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-2*t - y(t) + Derivative(y(t), t) - exp(-y(t)),0) 
ics = {y(0): 0} 
dsolve(ode,func=y(t),ics=ics)
 
NotImplementedError : The given ODE -2*t - y(t) + Derivative(y(t), t) - exp(-y(t)) cannot be solved by the lie group method