# (Probably simple) Differential equation

What are the solutions to the diff eqn: $A\dot{x} + \cos(x) - 1 = B$ subject to boundary conditions $\lim\limits_{x \to -\infty} x(t) = 0$ and $\lim\limits_{x \to +\infty} x(t) = C$, where $A, B, C$ are constants?

-
Try writing $\dot{x} = dx/dt$, separate them to two sides, like $\displaystyle A\frac{dx}{1-\cos(x)} = B\,dt$, and integrate on both sides. – Shuhao Cao Aug 11 '11 at 18:35
@MathChief Shouldn't it be $\displaystyle A\frac{dx}{B+1-\cos(x)} = dt$ – Michael Banaszek Aug 11 '11 at 18:45
Are these limits when $t$ (and not $x$) goes to $\pm\infty$? And are the signs of $A$, $B$ and $C$ known? – Did Aug 11 '11 at 18:46
@Michael, that's right, my bad. – Shuhao Cao Aug 11 '11 at 19:08

## 1 Answer

Separation of variables gives $dx/(p + q\cos x) = dt$ for some $p$ and $q$ and this can be integrated on any (maximal) interval for which the left side is defined, to give $F(x)=t$ for an explicit function $F$. On such an interval $F$ will be monotonic and with range from $-\infty$ to $+\infty$; the solutions of the differential equation are $x(t) = F^{-1}(t+K)$ for constant $K$. Boundary behavior at infinity should be $x(\pm \infty) = \pm \infty$ according to the sign of $p+q\cos x$ in the interval.

If these calculations are correct then there is no freedom to define the boundary conditions at infinity, only at finite times.

-
In the expression $x(\pm\infty)=\pm\infty$ the first $\pm\infty$ should be replaced by the bounds of the maximal interval of integration of the differential equation. – Did Aug 11 '11 at 22:24
@Didier: yes, thanks. What I should have written is that the boundary behavior is $F(\pm \infty) = \pm \infty$ which is, except for the sign, independent of $A, B$ and $C$. Describing this in terms of $x$ (i.e., the maximal interval) does utilize the constants in the problem statement. – zyx Aug 12 '11 at 0:15
thank you, zyx! – quirkyquark Aug 13 '11 at 16:22