$$x'(t) = -x(t) + exp(t)$$
Can anyone please provide guidance on how to solve for $x(t)$?
$$x'(t) = -x(t) + exp(t)$$
Can anyone please provide guidance on how to solve for $x(t)$?
It is done in two steps.
1). Consider the associated homogeneous equation (you forget about the "free term", i.e. the term not containing the unknown function $x$): $ x'(t) = -x(t)$. This equation has the solution, $x(t) = \mathbb{e}^{-t} K$, with $K$ some constant.
2). Now, "vary" the constant obtained above, i.e. assume that it now becomes a function of $t$, therefore $x(t) = \mathbb{e}^{-t} K(t)$. Plug this new form of $x$ back into the original equation. This will produce another differential equation, this time the unknown function being $K$ (also note how terms containing underived $K$ magically vanish!): $K'(t) = \mathbb{e}^{2t}$. This new equation has for solution $K(t) = \frac {\mathbb{e} ^{2t}}{2} + C$, with $C$ some other constant. Now plug this $K(t)$ back into the formula of $x(t)$ from the previous step, obtaining $\frac {\mathbb{e} ^t}{2} + \frac {C}{\mathbb{e} ^t}$.
If you also have some initial condition, using it in a third step will fix $C$.
This procedure is a classic one, known as the "variation of constants method" (because in step 1 you allow the constant $K$ to become a function $K(t)$, and thus to "vary").
You can easily solve this one. First take $x(t)$ to the left side so that: \begin{equation} x'(t)+x(t)=exp(t) \end{equation} Now multiply both sides with $exp(t)\neq 0$ and you will have: \begin{equation} exp(t)x'(t)+exp(t)x(t)=exp^2(t) \end{equation} Now observe that the left side is the product derivative as follows: \begin{equation} (exp(t)x(t))' =exp^2(t) \Leftrightarrow exp(t)x(t)=\frac{1}{2}exp^2(t)+c \Leftrightarrow x(t)=\frac{1}{2}exp(t)+cexp^{-1}(t) \end{equation} and $c\in\mathbb{R}$. Now taking into account that $x(t_0)=x_0$, for some $t_0 \in \mathbb{R}$ you will have: \begin{equation} x(t_0)=\frac{1}{2}exp(t_0)+cexp^{-1}(t_0) \Leftrightarrow c=exp(t_0)(x_0-\frac{1}{2}exp(t_0)) \end{equation} and your final solution to the Cauchy problem above will be: \begin{equation} x(t)=\frac{1}{2}exp(t)+(exp(t_0)(x_0-\frac{1}{2}exp(t_0)))exp^{-1}(t) \end{equation}