39.5.2 problem Problem 24.18

Internal problem ID [6544]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 24. Solutions of linear DE by Laplace transforms. Supplementary Problems. page 248
Problem number : Problem 24.18
Date solved : Wednesday, March 05, 2025 at 12:56:21 AM
CAS classification : [_quadrature]

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

Using Laplace method With initial conditions

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

Maple. Time used: 0.140 (sec). Leaf size: 5
ode:=diff(y(x),x)+2*y(x) = 2; 
ic:=y(0) = 1; 
dsolve([ode,ic],y(x),method='laplace');
 
\[ y = 1 \]
Mathematica. Time used: 0.001 (sec). Leaf size: 6
ode=D[y[x],x]+2*y[x]==2; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 1 \]
Sympy. Time used: 0.142 (sec). Leaf size: 3
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*y(x) + Derivative(y(x), x) - 2,0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 1 \]