What method should I apply to solve this differential equation? What method should I use to solve the following differential equation?
$$\frac{dx}{dt}+x=\frac{dy}{dt}$$
Where $x,y$ are functions of $t\in[0,1].$
I know I should know how to do this, but it has been a while since I had to solve any ODE's.
 A: Assuming that $x(t)$ is known,
$$y=x+\int x\,dt+C.$$
If $y(t)$ is known,
$$\frac{d(e^tx)}{dt}=e^t\left(x+\frac{dx}{dt}\right)$$ hence
$$x=e^{-t}\left(\int y\,e^tdy+C\right).$$
If neither is known, take any differentiable function $f$ and
$$\begin{cases}x(t)=\dfrac{df}{dt}(t),\\y(t)=f(t)+\dfrac{df}{dt}(t).\end{cases}$$
A: Then you have a single equation in two "unknowns".  Just as in algebraic equations, there is not a unique solution.  The best you can do is solve for one in terms of the other.  For example, to solve the equation $\frac{dx}{dt}+ x= f(t)$ where f(t) is a known function, we first solve $\frac{dx}{dt}+ x= 0$ getting $x(t)= Ce^{-t}$ with C a constant determined by some other condition.  Now, using the method of "undetermined coefficients", we seek a solution to the entire equation of the form $x(t)= u(t)e^{-t}$.  Then $\frac{dx}{dt}= e^{-t}\frac{du}{dt}- e^{-t}u$ so the equation becomes $\frac{dx}{dt}+ x= e^{-t}\frac{du}{dt}- e^{-t}u+ e^{-t}u= e^{-t}\frac{du}{dt}= f(t)$ so that $\frac{du}{dt}= e^{t}f(t)$ and we can solve for u by integrating both sides with respect to u: $u(t)= \int e^t f(t)dt$.
In this particular problem, $f(t)= \frac{dy}{dt}$ so $u(t)= \int e^t \frac{dy}{dt}  dt$ which can be integrated "by parts".
