# Differential equation; Find the complete solution [closed]

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! :)

## closed as off-topic by Did, Claude Leibovici, Watson, zz20s, user228113 Apr 27 '16 at 17:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Did, Claude Leibovici, Watson, zz20s, Community
If this question can be reworded to fit the rules in the help center, please edit the question.

• Do you know how to solve $y'+2y=0$? – almagest Apr 26 '16 at 19:32
• No, sadly I dont. I just started math again after working for 7 years, so It all gone. – Simon Nielsen Apr 26 '16 at 19:38
• Ok. The equation $y'+k y=0$, where $k$ is a constant, has general solution $y=Ae^{-kx}$, as you can easily check by differentiating. To deal with the term on the rhs you try $e^x$. Substituted into the lhs that gives $e^x+2e^x$ which is what you want. Hence the general solution is $y=e^x+Ae^{-2x}$. You find the value of $A$ by an initial condition which might specify the value of $y(0)$. – almagest Apr 26 '16 at 19:43
• Ok. I go the most part. But where do you get the e^x? – Simon Nielsen Apr 26 '16 at 19:52
• You just have to know that the exponential function $e^x$ has the property that differentiating it gives $e^x$. So if you differentiate $Ae^x$ you just get $Ae^x$. If you differentiate $Ae^{kx}$ you get $Ake^{kx}$. $e$ is a number around 2.71828. – almagest Apr 26 '16 at 20:00

Solving differential equations of this kind consists of two parts:

1. finding the general solution $y_c(x)$ of the homogeneous differential equation $$y_c' + 2y_c = 0$$

2. 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$$