Given the following initial value problem $$\left\{\begin{array}{l}x'(t)+p(t)x(t)=g(t) \\ x(0)=1 \end{array}\right.$$ I have to find $p(t)$ and $g(t)$ such that the solutions $x(t)$ converge to $0$ when $t\to+\infty$
Using the integrating factor, I didn't find anything that I think it could help me - just $x(t)$ written as integral of $e^{p(t)}$ etc. On Google, the articles I found are in a high level that I can't understand.
My question is: is there a simple way to make it? Or should I just try to get some functions, like $p(t)=x^2$ and $g(t)=1$ and solve the problem and evaluate the limit?
If I understood you question correctly, one can determine a relation between $p(t)$ and $g(t)$ by setting $x(t) = e^{-t}$ in the equation you get $$ - e^{-t} + p(t) e^{-t} = g(t) $$ Obviously $x(t) \to 0$ as $t \to \infty$ and $x(0) = 1$ as the boundary conditions. Set for example $p(t) = x^2$ you get $$ g(t) = (p(t) - 1)e^{-t} = (x^2 - 1)e^{-t} $$ Try setting $x(t) = e^{-t^2}$ in the equation you get $$ - 2t e^{-t^2} + p(t) e^{-t^2} = g(t) $$ you get $$ g(t) = ( + p(t) - 2t) e^{-t^2} $$ and as before $x(t) \to 0$ as $t \to \infty$ and $x(0) = 1$