79.3.1 problem 7 (i)

Internal problem ID [18525]
Book : Elementary Differential Equations. By R.L.E. Schwarzenberger. Chapman and Hall. London. First Edition (1969)
Section : Chapter 5. Linear equations. Exercises at page 85
Problem number : 7 (i)
Date solved : Tuesday, January 28, 2025 at 11:51:57 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

With initial conditions

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

Solution by Maple

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

dsolve([diff(x(t),t$2)-x(t)=t^2,x(0) = 0, D(x)(0) = 1],x(t), singsol=all)
 
\[ x = \frac {{\mathrm e}^{-t}}{2}+\frac {3 \,{\mathrm e}^{t}}{2}-t^{2}-2 \]

Solution by Mathematica

Time used: 0.013 (sec). Leaf size: 27

DSolve[{D[x[t],{t,2}]-x[t]==t^2,{x[0]==0,Derivative[1][x][0] == 1}},x[t],t,IncludeSingularSolutions -> True]
 
\[ x(t)\to \frac {1}{2} \left (-2 \left (t^2+2\right )+e^{-t}+3 e^t\right ) \]