2.3.22 problem 23

Internal problem ID [698]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 1.4. Separable equations. Page 43
Problem number : 23
Date solved : Tuesday, September 30, 2025 at 04:06:26 AM
CAS classification : [_quadrature]

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

With initial conditions

\begin{align*} y \left (1\right )&=1 \\ \end{align*}
Maple. Time used: 0.032 (sec). Leaf size: 14
ode:=1+diff(y(x),x) = 2*y(x); 
ic:=[y(1) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {1}{2}+\frac {{\mathrm e}^{-2+2 x}}{2} \]
Mathematica. Time used: 0.016 (sec). Leaf size: 18
ode=1+D[y[x],x] == 2*y[x]; 
ic=y[1]==1; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} \left (e^{2 x-2}+1\right ) \end{align*}
Sympy. Time used: 0.078 (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} \]