7.3.23 problem 23

Internal problem ID [63]
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.4 (separable equations). Problems at page 43
Problem number : 23
Date solved : Tuesday, March 04, 2025 at 10:41:17 AM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }+1&=2 y \end{align*}

With initial conditions

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

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