8.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, March 04, 2025 at 11:33:01 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.009 (sec). Leaf size: 14
ode:=1+diff(y(x),x) = 2*y(x); 
ic:=y(1) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {1}{2}+\frac {{\mathrm e}^{2 x -2}}{2} \]
Mathematica. Time used: 0.024 (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]
 
\[ y(x)\to \frac {1}{2} \left (e^{2 x-2}+1\right ) \]
Sympy. Time used: 0.132 (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} \]