Hello, Diogo. Let me help you a little bit.
I guess you want to use the
separation of variables method, but in this equation, that's not possible. What I would do is to write the equation in the following form:
[MATH]x'(t)+p(t)x(t)=q(t)[/MATH]
That is called a linear differential equation, and there are many known methods to arrive at their solution. Let me show you one of them:
First, we need to find an integrator factor [MATH]\mu (t)[/MATH] so we can integrate the left side of the equation. This factor is given by
[MATH]\mu (t)=e^{\int p(t)dt}[/MATH]
Then, you multiply every term of the equation by [MATH]\mu (t)[/MATH] and you will get to
[MATH]e^{\int p(t)dt}x'(t)+e^{\int p(t)dt}p(t)x(t)=e^{\int p(t)dt}q(t)[/MATH]
And this may look pretty scary, but believe me, it's not.
The following step is to write the left side of the equation in an integrated form:
[MATH]\frac{\mathrm{d} }{\mathrm{d} x}(e^{\int p(t)dt}x(t))=e^{\int p(t)dt}q(t)[/MATH]
[MATH]e^{\int p(t)dt}x(t)=\int e^{\int p(t)dt}q(t)[/MATH]
And the general solution is:
[MATH]x(t)=e^{-\int p(t)dt}\int e^{\int p(t)dt}q(t)dt[/MATH]
My advice: don't use the general formula for the solution. Follow every step. I'll give you a hint:
[MATH]\mu (t)=\frac{1}{1+t^2}[/MATH]
I hope it could help you