Particulate solution for $y''(x)-3y'(x)=2x+1+e^{3x}$ I am in the process of solving this differential equation: $$y''(x)-3y'(x)=2x+1+e^{3x}$$
I have the homogeneous solution. However, I am not getting anywhere with the particular solution.
One of the homogeneous solutions is $e^{3x}$, which is why we would multiply an $x$ to it in the particulate approach. However, the other homogeneous solution is $1$ and I don't know exactly how it works.
Could someone help me with this?
 A: Hint: Three ways:

*

*Let $w=y'$ so you reduce it to a first order differential equation $w'-3w=x+1+e^{3x}$


*Use the method called "Undetermined Coefficients". Here is a link:
https://tutorial.math.lamar.edu/classes/de/undeterminedcoefficients.aspx
This is a standard method to find particular solutions under some conditions. You can see the table in this link, and it helps organize those cases.


*Use the method called "Variation of Parameters". Here is a link:
https://tutorial.math.lamar.edu/classes/de/VariationofParameters.aspx
This is also a standard method to find particular solutions, and it is much more powerful than method #2.
A: $$y''(x)-3y'(x)=2x+1+e^{3x}$$
Multiply by $e^{-3x}$:
$$(y'(x)e^{-3x})'=2xe^{-3x}+e^{-3x}+1$$
Integrate both sides.
A: Your homogenous equation $y''-3y'=0$ has characteristic equation $r^2-3r=0$ with roots $r=0$ and $r=3$.
Whose general solution is $y_h=C_1e^{0x}+C_2e^{3x}=C_1+C_2e^{3x}$
Now to find particular solutions you need to consider this recipe:


*

*your homogeneous equation has root $b$ with multiplicity $m$ (convention $m=0$ if $b$ is not a root)

*the full equation has a RHS of the form $P(x)e^{bx}$ with $P$ polynomial.

 Then you need to search for a particular solution in the form
$Q(x)e^{bx}$ with $Q$ polynomial and $$\deg(Q)=\deg(P)+m$$
Although since the homogeneous solution will already have vanishing
terms $(C_0+C_1x+\cdots+C_{m-1}x^{m-1})e^{bx}$, you can ignore them in
the polynomial Q.
In case of a linear combination of such terms in the RHS, you can also
search for a linear combination of particular solutions for each.
Note: in the special case of $RHS = P(x)$, consider the root $b=0$ since $e^{0x}=1$, and the same rule applies.

Your right hand side is $RHS=\underbrace{(2x+1)}_\text{degree 1}\times e^{0x}+\underbrace{1}_\text{degree 0}\times e^{3x}$
Since both $0$ and $3$ are roots with multiplicity $1$ you need to search for a particular solution where the degree of the polynomial is raised by $1$ for both.
Therefore $y_p=(ax^2+bx+c)+(dx+e)e^{3x}$
Note that to simplify the calculation we can ignore $c$ and $e$ as they will cancel (solution of homogeneous equation already).
So search for $y_p=(ax^2+bx)+dxe^{3x}$, report in the ODE, and equate the coefficients to the desired RHS.
