First check the characteristic solution. The characteristic equation to this DE is
<em>r</em> ² - <em>r</em> = <em>r</em> (<em>r</em> - 1) = 0
with roots <em>r</em> = 0 and <em>r</em> = 1, so the characteristic solution is
<em>y</em> (char.) = <em>C₁ </em>exp(0<em>x</em>) + <em>C₂</em> exp(1<em>x</em>)
<em>y</em> (char.) = <em>C₁</em> + <em>C₂</em> exp(<em>x</em>)
For the particular solution, we try the <em>ansatz</em>
<em>y</em> (part.) = (<em>ax</em> + <em>b</em>) exp(<em>x</em>)
but exp(<em>x</em>) is already accounted for in the second term of <em>y</em> (char.), so we multiply each term here by <em>x</em> :
<em>y</em> (part.) = (<em>ax</em> ² + <em>bx</em>) exp(<em>x</em>)
Differentiate this twice and substitute the derivatives into the DE.
<em>y'</em> (part.) = (2<em>ax</em> + <em>b</em>) exp(<em>x</em>) + (<em>ax</em> ² + <em>bx</em>) exp(<em>x</em>)
… = (<em>ax</em> ² + (2<em>a</em> + <em>b</em>)<em>x</em> + <em>b</em>) exp(<em>x</em>)
<em>y''</em> (part.) = (2<em>ax</em> + 2<em>a</em> + <em>b</em>) exp(<em>x</em>) + (<em>ax</em> ² + (2<em>a</em> + <em>b</em>)<em>x</em> + <em>b</em>) exp(<em>x</em>)
… = (<em>ax</em> ² + (4<em>a</em> + <em>b</em>)<em>x</em> + 2<em>a</em> + 2<em>b</em>) exp(<em>x</em>)
(<em>ax</em> ² + (4<em>a</em> + <em>b</em>)<em>x</em> + 2<em>a</em> + 2<em>b</em>) exp(<em>x</em>) - (<em>ax</em> ² + (2<em>a</em> + <em>b</em>)<em>x</em> + <em>b</em>) exp(<em>x</em>)
= <em>x</em> exp(<em>x</em>)
The factor of exp(<em>x</em>) on both sides is never zero, so we can cancel them:
(<em>ax</em> ² + (4<em>a</em> + <em>b</em>)<em>x</em> + 2<em>a</em> + 2<em>b</em>) - (<em>ax</em> ² + (2<em>a</em> + <em>b</em>)<em>x</em> + <em>b</em>) = <em>x</em>
Collect all the terms on the left side to reduce it to
2<em>ax</em> + 2<em>a</em> + <em>b</em> = <em>x</em>
Matching coefficients gives the system
2<em>a</em> = 1
2<em>a</em> + <em>b</em> = 0
and solving this yields
<em>a</em> = 1/2, <em>b</em> = -1
Then the general solution to this DE is
<em>y(x)</em> = <em>C₁</em> + <em>C₂</em> exp(<em>x</em>) + (1/2 <em>x</em> ² - <em>x</em>) exp(<em>x</em>)
For the given initial conditions, we have
<em>y</em> (0) = <em>C₁</em> + <em>C₂</em> = 6
<em>y'</em> (0) = <em>C₂</em> - 1 = 5
and solving for the constants here gives
<em>C₁</em> = 0, <em>C₂</em> = 6
so that the particular solution to the IVP is
<em>y(x)</em> = 6 exp(<em>x</em>) + (1/2 <em>x</em> ² - <em>x</em>) exp(<em>x</em>)