40.11.9 problem 34

Internal problem ID [6743]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 16. Linear equations with constant coefficients (Short methods). Supplemetary problems. Page 107
Problem number : 34
Date solved : Monday, January 27, 2025 at 02:27:04 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Solution by Maple

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

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

Solution by Mathematica

Time used: 0.015 (sec). Leaf size: 26

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