33.17 problem 846

Internal problem ID [15569]

Book: A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section: Chapter 3. Section 24.2. Solving the Cauchy problem for linear differential equation with constant coefficients. Exercises page 249
Problem number: 846.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {x^{\prime \prime }+x=2 \cos \left (t \right )} \] With initial conditions \begin {align*} [x \left (0\right ) = -1, x^{\prime }\left (0\right ) = 1] \end {align*}

Solution by Maple

Time used: 0.047 (sec). Leaf size: 15

dsolve([diff(x(t),t$2)+x(t)=2*cos(t),x(0) = -1, D(x)(0) = 1],x(t), singsol=all)
 

\[ x = -\cos \left (t \right )+\sin \left (t \right ) \left (1+t \right ) \]

Solution by Mathematica

Time used: 0.047 (sec). Leaf size: 16

DSolve[{x''[t]+x[t]==2*Cos[t],{x[0]==-1,x'[0]==1}},x[t],t,IncludeSingularSolutions -> True]
 

\[ x(t)\to (t+1) \sin (t)-\cos (t) \]