5.39 problem 43

Internal problem ID [14268]

Book: INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section: Chapter 2. First Order Equations. Exercises 2.3, page 49
Problem number: 43.
ODE order: 1.
ODE degree: 1.

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

\[ \boxed {y^{\prime }+y=\left \{\begin {array}{cc} t & 0\le t <1 \\ 0 & 1\le t \end {array}\right .} \] With initial conditions \begin {align*} [y \left (0\right ) = 1] \end {align*}

Solution by Maple

Time used: 0.344 (sec). Leaf size: 33

dsolve([diff(y(t),t)+y(t)=piecewise(0<=t and t<1,t,t>=1,0),y(0) = 1],y(t), singsol=all)
 

\[ y \left (t \right ) = \left \{\begin {array}{cc} {\mathrm e}^{-t} & t <0 \\ 2 \,{\mathrm e}^{-t}+t -1 & t <1 \\ 2 \,{\mathrm e}^{-t} & 1\le t \end {array}\right . \]

Solution by Mathematica

Time used: 0.065 (sec). Leaf size: 37

DSolve[{y'[t]+y[t]==Piecewise[{{t,0<=t<1},{0,t>=1}}],{y[0]==1}},y[t],t,IncludeSingularSolutions -> True]
 

\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} e^{-t} & t\leq 0 \\ 2 e^{-t} & t>1 \\ t+2 e^{-t}-1 & \text {True} \\ \end {array} \\ \end {array} \]