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

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

Solution by Maple

Time used: 0.01 (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 \relax (x ) = \frac {\left (4 \cos \relax (x )-5 \sin \relax (x )\right ) {\mathrm e}^{x}}{2}+\frac {x}{2}+1 \]

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*}