1.8 problem 20

Internal problem ID [5233]

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

CAS Maple gives this as type [[_2nd_order, _with_linear_symmetries]]

\[ \boxed {y^{\prime \prime }-y=4-x} \]

Solution by Maple

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

dsolve(diff(y(x),x$2)-y(x)=4-x,y(x), singsol=all)
 

\[ y \left (x \right ) = c_{2} {\mathrm e}^{-x}+{\mathrm e}^{x} c_{1} +x -4 \]

Solution by Mathematica

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

DSolve[y''[x]-y[x]==4-x,y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to x+c_1 e^x+c_2 e^{-x}-4 \]