8.1 problem 21

Internal problem ID [188]

Book: Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section: Section 5.2, second order linear equations. Page 311
Problem number: 21.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

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

dsolve([diff(y(x),x$2)+y(x)=3*x,y(0) = 2, D(y)(0) = -2],y(x), singsol=all)
 

\[ y \left (x \right ) = -5 \sin \left (x \right )+2 \cos \left (x \right )+3 x \]

Solution by Mathematica

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

DSolve[{y''[x]+y[x]==3*x,{y[0]==2,y'[0]==-2}},y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to 3 x-5 \sin (x)+2 \cos (x) \]