40.1.8 problem 20

Internal problem ID [6576]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 2. Solutions of differential equations. Supplemetary problems. Page 11
Problem number : 20
Date solved : Monday, January 27, 2025 at 02:13:57 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-y&=4-x \end{align*}

Solution by Maple

Time used: 0.003 (sec). Leaf size: 17

dsolve(diff(y(x),x$2)-y(x)=4-x,y(x), singsol=all)
 
\[ y = c_2 \,{\mathrm e}^{-x}+{\mathrm e}^{x} c_1 +x -4 \]

Solution by Mathematica

Time used: 0.014 (sec). Leaf size: 22

DSolve[D[y[x],{x,2}]-y[x]==4-x,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to x+c_1 e^x+c_2 e^{-x}-4 \]