1.4.13 problem 13

Internal problem ID [85]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.5 (linear equations). Problems at page 54
Problem number : 13
Date solved : Tuesday, September 30, 2025 at 03:42:53 AM
CAS classification : [[_linear, `class A`]]

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

With initial conditions

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