71.15.6 problem 4 (g)

Internal problem ID [14548]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 5. The Laplace Transform Method. Exercises 5.4, page 265
Problem number : 4 (g)
Date solved : Tuesday, January 28, 2025 at 06:43:16 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-4 y&=\left \{\begin {array}{cc} x & 0\le x <1 \\ 1 & 1\le x \end {array}\right . \end{align*}

Using Laplace method With initial conditions

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

Solution by Maple

Time used: 14.143 (sec). Leaf size: 42

dsolve([diff(y(x),x$2)-4*y(x)=piecewise(0<=x and x<1,x,1<=x,1),y(0) = 0, D(y)(0) = 0],y(x), singsol=all)
 
\[ y = \frac {\left (\left \{\begin {array}{cc} \sinh \left (2 x \right )-2 x & x <1 \\ \sinh \left (2\right )-4 & x =1 \\ \sinh \left (2 x \right )-\sinh \left (2 x -2\right )-2 & 1<x \end {array}\right .\right )}{8} \]

Solution by Mathematica

Time used: 0.025 (sec). Leaf size: 36

DSolve[{D[y[x],{x,2}]-4*y[x]==Piecewise[{ {x,0<=x<1},{x,x>=1}}],{y[0]==0,Derivative[1][y][0] ==0}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \begin {array}{cc} \{ & \begin {array}{cc} 0 & x\leq 0 \\ \frac {1}{16} e^{-2 x} \left (-4 e^{2 x} x+e^{4 x}-1\right ) & \text {True} \\ \end {array} \\ \end {array} \]