# 1st order, nonhomogeneous, linear DE - particular solution

I know nothing about DEs, so this may be a silly question.

I'm given some time varying $(x_t)_t$ and a constant $r$, and I want to solve the equation $u_t = rx_t + \dot u_t$ for $u$.

What I know so far is that (solving the homogeneous equation) if $\bar u$ is some particular solution, then any $u$ is a solution iff it takes the form $u_t=\bar u_t + \alpha e^{rt}$ for some constant $\alpha$.

I'm wondering whether there's a brute force way of finding some $\bar u$. Anywhere I've looked suggests the "method of undetermined coefficients", but I know it's not useful in my setting. Is there a formula I can blindly apply to get a particular solution? I'm happy to assume $x$ as well behaved as needed, and I'm happy to have my formula be some horrible definite integral I can't compute.

fzero
Homework Helper
Gold Member
The general method for finding particular solutions is called variation of parameters, though in this case, we can use an integrating factor to save quite a bit of work. Note that

$$e^t \frac{d}{dt} \left( e^{-t} u\right) = \dot{u} - u,$$

so that the integrating factor ##e^{-t}## will lead to a particular solution in the form of an indefinite integral involving ##x_t##.

HallsofIvy
Homework Helper
I know nothing about DEs, so this may be a silly question.

I'm given some time varying $(x_t)_t$ and a constant $r$, and I want to solve the equation $u_t = rx_t + \dot u_t$ for $u$.
So the subscript t just means that u and x are functions of t?

What I know so far is that (solving the homogeneous equation) if $\bar u$ is some particular solution, then any $u$ is a solution iff it takes the form $u_t=\bar u_t + \alpha e^{rt}$ for some constant $\alpha$.
No. That would be the case if the "r" were multiplying $u_t$, not x. The general solution to the equation $u'(t)+ rx(t)= u(t)$ is $\bar u(t)+ \alpha e^t$.

I'm wondering whether there's a brute force way of finding some $\bar u$. Anywhere I've looked suggests the "method of undetermined coefficients", but I know it's not useful in my setting. Is there a formula I can blindly apply to get a particular solution? I'm happy to assume $x$ as well behaved as needed, and I'm happy to have my formula be some horrible definite integral I can't compute.
I'm not sure you would call it "brute force" but I would use "variation of parameters". Knowing that $u(t)= Ce^t$, for C any constant, satisfies $u'- u= 0$, to solve the problem $u'- u= -rx(t)$, look for a solution of the form $u(t)= v(t)e^t$. Then $u'(t)= v'(t)e^t+ ve^t$. so $u'- u= v'e^t+ ve^t- ve^t= v'e^t= -rx$ then $v'= -re^{-t}x(t)$. Then $v(t)= -r\int_0^t e^{-\tau}x(\tau)d\tau+ C$ so that
$$u(t)= -re^t\int_0^t e^{-\tau}x(\tau)d\tau+ Ce^t$$

Whoops, I'd meant to write $ru_t = rx_t + \dot u_t$, but anyway...

Thank you very much, folks! You have been extremely helpful. :)