11.20 problem 35

Internal problem ID [238]

Book: Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section: Section 5.5, Nonhomogeneous equations and undetermined coefficients Page 351
Problem number: 35.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

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

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

\[ y \left (x \right ) = \frac {\left (4 \cos \left (x \right )-5 \sin \left (x \right )\right ) {\mathrm e}^{x}}{2}+1+\frac {x}{2} \]

Solution by Mathematica

Time used: 0.004 (sec). Leaf size: 25

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

\begin{align*} y(x)\to \frac {1}{2} \left (x+e^x (4 \cos (x)-5 \sin (x))+2\right ) \\ \end{align*}