Find periodic solution of differential equation Solve the equation:
$\frac{dy}{dx}=2y\cos^2x -\sin x$
So I've started from solving homogeneous one:
$\frac{dy}{dx}=2y \cos^2x=\cos2x+1$
And got:
$y=c(x)e^{\frac{1}{2}\sin2x+x}$
Then I have wanted to find $c(x)$, but I've failed:
$c'(x)=-\sin x e^{-\frac{1}{2}\sin2x-x}$
 A: This problem is exactly the case when having particular functions slightly disorients and doesn't help finding the solution.
Just consider the general first-order linear equation
$$ y' = a(x) y + b (x) $$
You know how to solve it. Let $F(x)$ be some solution of corresponding homogeneous equation. Then using variation of constant we can write solution to original non-homogeneous equation in following form
$$ y(x) = \left (\frac{y(0)}{F(0)} + \int\limits_{0}^{x} \frac{b(t)}{F(t)} \, dt \right ) \cdot F(x) .$$
Now suppose that $a(x)$ and $b(x)$ are $T$-periodic functions and you are interested in finding $T$ periodic solutions of your original equation.
Then it must hold that $y(x+T) \equiv y(x)$ for any $x$; and of course we should have $y(T) = y(0)$. This leads to the following equation:
$$ y(0) = y(T) = \left (\frac{y(0)}{F(0)} + \int\limits_{0}^{T} \frac{b(t)}{F(t)} \, dt \right ) \cdot F(T) $$
or
$$ y(0) \cdot \left ( 1 - \frac{F(T)}{F(0)} \right ) = F(T)  \int\limits_{0}^{T} \frac{b(t)}{F(t)} \, dt . $$
This is a linear algebraic equation with respect to $y(0)$ which can have infinite number of solutions, a unique solution or no solutions at all depending on its coefficients. In your case it is possible to estimate whether $F(T) = F(0)$ or not which will lead to a final conclusion about an existence of a $T$-periodic solution.
