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]]

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

Solution by Maple

Time used: 0.007 (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 \relax (x ) = -5 \sin \relax (x )+2 \cos \relax (x )+3 x \]

Solution by Mathematica

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

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

\begin{align*} y(x)\to 3 x-5 \sin (x)+2 \cos (x) \\ \end{align*}