[Math] $y” – y’ = e^x$ (Variation of Parameters)

multivariable-calculusordinary differential equations

I've solved multiple differential equations in this practice set, and even a few with variation of parameters, but no matter how many times I restart this problem I can't get it. I must be doing something wrong in my approach:

$$y''-y'=e^x.$$
1) First, I use the homogeneous differential $y'' – y'= 0$, which gives me the complementary solutions: $$y_c=c_1 +c_2e^x.$$
2) Next, I need to determine the solution using variation of parameters of form: $$y_p = u_1 + u_2 e^x$$
$$y'_p = u'_1 + u'_2e^x + u_2e^x$$
I set $u'_1 + u'_2e^x = 0$; thus, $$ y''_p = u'_2e^x+u_2e^x,$$
and substitute in to the original equation, $y'' – y' = e^x$:
$$ u'_2e^x+u_2e^x – u_2e^x = e^x$$
$$u'_2e^x = e^x$$
$$u'_2 = 1$$
And I can solve for the other expressions using substitution ($u'_2e^x = -u'_1$) and integration:
$$ u_2 = x, u'_1 = -e^x, u_1 = -e^x$$
And using $y_p = u_1 + u_2e^x = -e^x +xe^x$ and my value for $y_c$:
$$y = y_c + y_p = c_1 +c_2e^x – e^x + xe^x$$
This is definitely not the correct solution ($y = c_1 + c_2e^x + xe^x$). What did I do wrong?

Best Answer

$$y = y_c + y_p = c_1 +C_2e^x - e^x + xe^x$$ $C_2e^x - e^x=(C_2-1)e^x=c_2e^x$ where $c_2=C_2-1$

So, you did nothing wrong : $$y = c_1 + c_2e^x + xe^x$$