23.3.12 problem 8(b)

Internal problem ID [4153]
Book : Theory and solutions of Ordinary Differential equations, Donald Greenspan, 1960
Section : Chapter 4. The general linear differential equation of order n. Exercises at page 63
Problem number : 8(b)
Date solved : Monday, January 27, 2025 at 08:40:05 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Solution by Maple

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

dsolve(diff(y(x),x$2)+2*diff(y(x),x)-2*y(x)=1+x^2,y(x), singsol=all)
 
\[ y \left (x \right ) = {\mathrm e}^{\left (\sqrt {3}-1\right ) x} c_{2} +{\mathrm e}^{-\left (1+\sqrt {3}\right ) x} c_{1} -\frac {x^{2}}{2}-x -2 \]

Solution by Mathematica

Time used: 0.022 (sec). Leaf size: 46

DSolve[D[y[x],{x,2}]+2*D[y[x],x]-2*y[x]==1+x^2,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to -\frac {x^2}{2}-x+c_1 e^{-\left (\left (1+\sqrt {3}\right ) x\right )}+c_2 e^{\left (\sqrt {3}-1\right ) x}-2 \]