Periodic solution of $\dot{x} = a(t) x + b(t)$ with $a$ and $b$ periodic Given the first-order linear equation $\dot{x} = a(t) x + b(t)$ where $a$ and $b$ are $T$-periodic functions, show that it has a periodic solution if and only if $\exp\left[\int_0^T a(s)\, ds\right] \neq 1$. Find the periodic solution of the equation $\dot{x} = t x + \sin(t)$.
I solved the homogeneous equation
$$ \int_0^T \frac{\dot{x}(s)}{x(s)} \, ds = \ln\left(\frac{x(T)}{x(0)}\right) = \int_0^T a(s) \, ds \, . $$
But how to show $\exp\left[\int_0^T a(s)\, ds\right] \neq 1$ ?
 A: I wouldn't worry about your grammar that can easily be fixed by people with a penchant for it. You can solve the general governing equation by the integrating factor method. If you are confused with this Wolfram Alpha has a lovely page explaining the details on this which helped me during my Bachelors. This is the general method when given a non-homogeneous first order ODE.
TRICK: First, set the integrating factor to be
\begin{equation}
m(t)=\text{exp}\bigg[ \int a(t)dt\bigg]
\end{equation}
Recall that this method does not bother with the constant of integration. Then by the product rule and integrating both sides with respect to $t$ will yield the general solution,
\begin{equation}
x(t)=\text{exp}\bigg[- \int a(t)dt\bigg]\int m(t) b(t)dt
\end{equation}
HINT: Now, by definition of a periodic solution $x(t)=X(t+T)$ as we have assumed that the solution is periodic in $T$. Note that this definition holds for $a$ and $b$ as well. It should now just be an exercise of plugging in limits when you have got this far.
Hopefully, this helps a little bit it is very late for me and I have tried to direct you down the route I would choose to solve this!
