Hey guys I'm stuck with a Differential equation.
Can anyone help me finding the complete solution to $dy/dx + 2y = 3e^x$
Any help would be greatly appreciated! :)
$\endgroup$ 61 Answer
$\begingroup$Solving differential equations of this kind consists of two parts:
finding the general solution $y_c(x)$ of the homogeneous differential equation $$y_c' + 2y_c = 0$$
finding any one solution $y_p(x)$ that satisfy $$y_p' + 2y_p = 3e^x$$
To solve $y_c(x)$, notice the property of exponential function $$\frac d{dx}Ce^{kx} = Cke^{kx}$$ So by trying $y_c(x) = Ce^{kx}$, $$y_c' + 2y_c = Cke^{kx}+2Ce^{kx} = C(k+2)e^{kx}$$ Regardless of the value of $C$, and since $e^{kx}\ne 0$, this becomes solving a polynomial equation $$k+2 = 0$$ And so the general solution for $y_c$ is $$y_c(x) = Ce^{-2x}$$
A rule of thumb function to set $y_p(x)$ with is $C_2e^x$, which is the right hand side $3e^x$ scaled by a factor. Then
$$y_p'+2y_p = C_2e^x + 2C_2e^x = 3C_2e^x$$
which gives $C_2 = 1$. This time, however, $C_2$ is not an arbitrary constant, because a scaled $y_p$ does not give the same right hand side $3e^x$.
The required general $y(x) = y_c(x) + y_p(x) = Ce^{-2x} + e^x$, because $$(y_c+y_p)' + 2(y_c+y_p) = y_c'+2y_c + y_p'+2y_p = 0 + 3e^x = 3e^x$$
$\endgroup$