15.12 problem 12

Internal problem ID [10501]

Book: A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section: Chapter 3, Laplace transform. Section 3.2.1 Initial value problems. Exercises page 156
Problem number: 12.
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [[_linear, `class A`]]

\[ \boxed {x^{\prime }-x+2 \operatorname {Heaviside}\left (-1+t \right )=0} \] With initial conditions \begin {align*} [x \left (0\right ) = 1] \end {align*}

Solution by Maple

Time used: 0.031 (sec). Leaf size: 20

dsolve([diff(x(t),t)=x(t)-2*Heaviside(t-1),x(0) = 1],x(t), singsol=all)
 

\[ x \left (t \right ) = \left (-2 \,{\mathrm e}^{t -1}+2\right ) \operatorname {Heaviside}\left (t -1\right )+{\mathrm e}^{t} \]

Solution by Mathematica

Time used: 0.048 (sec). Leaf size: 25

DSolve[{x'[t]==x[t]-2*UnitStep[t-1],{x[0]==1}},x[t],t,IncludeSingularSolutions -> True]
 

\begin{align*} x(t)\to {cc} \{ & {cc} e^t & t\leq 1 \\ 2+(-2+e) e^{t-1} & \text {True} \\ \\ \\ \\ \\ \end{align*}