15.14 problem 15

Internal problem ID [11521]

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: 15.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 6.062 (sec). Leaf size: 21

dsolve([diff(x(t),t$2)+Pi^2*x(t)=Pi^2*Heaviside(1-t),x(0) = 1, D(x)(0) = 0],x(t), singsol=all)
 

\[ x \left (t \right ) = 1+\left (-\cos \left (\pi t \right )-1\right ) \operatorname {Heaviside}\left (t -1\right ) \]

Solution by Mathematica

Time used: 0.049 (sec). Leaf size: 18

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

\[ x(t)\to \begin {array}{cc} \{ & \begin {array}{cc} 1 & t\leq 1 \\ -\cos (\pi t) & \text {True} \\ \end {array} \\ \end {array} \]