When solving ordinary differential equation, why use specific formula for particular integral. I am studying Ordinary Differential Equations. In the study guide I have been given, there is an example where you have to solve the ODE. According to the lecturer there is a mistake in the solution and we have to correct the mistake and solve the rest of the solution. However I don't understand why it is a mistake in the first place.
The simplified example is:
$$3D(D+1)[x] = 3e^t + 5 $$
Solve for x.
I understand that the complimentary function is:
$$ x_{C.F.}(t) = c_1 + c_2e^{-t}$$
When solving for the particular integral the study guide originally suggested the following solution:
$$ x_{P.I.}(t) = Ae^t + Bt$$
This results in the following
$$\dot{x}_{P.I.}(t) = Ae^t + B$$
$$\ddot{x}_{P.I.}(t) = Ae^t$$
Solving for A and B results in $A = \frac12$ and $B = \frac53$
Therefore:
$$x(t) = c_1 + c_2e^{-t} + \frac12e^t + \frac53t$$
The lecturer says that original assumption for the particular integral is wrong and should be:
$$ x_{P.I.}(t) = Ae^t + B$$
This results in the following
$$\dot{x}_{P.I.}(t) = Ae^t$$
$$\ddot{x}_{P.I.}(t) = Ae^t$$
When I sub this into the original equation I get the following:
$$6Ae^t = 3e^t + 5$$
Which does not make sense. Am I doing something wrong? I simply don't understand how to solve for B.
 A: I'm afraid your solution is incorrect, as is the lecturer's.
Let's build the solution piece by piece. We'll start with the homogenous part by assuming that the ODE is solved by some $x(t) = e^{rt}$ and plugging this in we find $3r^2+r=0 \iff r=0 \text{ or } r=-\frac{1}{3}$. So $$u_1(t) := c_1 e^{-\frac{1}{3}t} + c_2$$ is the general solution to the homogenous equation. Next we'll find a particular solution for $P[x](t)=3e^t$ (where $P := 3D^2 + D$). Set $x(t) = ce^{rt}$, then $P[x](t) = ce^{rt}(3r^2+r) = 3e^t$ and you can see quite easily that we'd have this equality if $r=1$ and $c(3r^2+1)=3$, which of course is the case when $c=\frac{3}{3r^2+1} = \frac{3}{4}$. So we set $$u_2(t) = \frac{3}{4}e^t.$$
Now we just need to find $u_3$ such that $P[u_3] \equiv 5$. This seems like it might be a polynomial and given that we want to be linear after differentiating twice we'll assume that it has order 2. So we set $x(t) = a_0 + a_1t + a_2 t^2$ and calculate
$$
P[x](t) = 3(2a_2) + (a_1 + 2a_2t) = a_1 + 6a_2 + 2a_2t = 5
$$
which we readily solve to $a_2 = 0, a_1 = 5$. We thus set $u_3(t) = 5t$.
This means our particular solution is given by $u_p := u_2 + u_3$ and the general solution by $u := u_1 + u_p$; so for coefficients $c_1, c_2 \in \Bbb C$ the function
$$
u(t) = c_1 e^{-\frac{1}{3}t} + c_2 + \frac{3}{4}e^t + 5t
$$
will be a solution to the ODE. For future reference: you can easily solve lots of ODE's using computer algebra systems like Wolfram Alpha, SymPy, DifferentialEquations.jl, SageMath etc. to verify your solutions. This example: https://www.wolframalpha.com/input/?i=solve+3+x%27%27+%2B+x%27+%3D+3e%5Et+%2B+5.
