Can this function be integrated with respect to x? I would like to integrate the following function with respect to $x$. This is for a signal processing project. 
$y = \cos(x + ay -a), \ -1 < a < 1$
so the function would pass the vertical line test. 
Is it possible to integrate this type of function? I tried an integral calculator, but functions containing $y$ in them are not an acceptable input. 
 A: The effect of replacing $x$ in $\cos x$ with $x + a y - a$ is a shear.  In particular, this shear can be represented by the (homogeneous matrix)
$$  M = \begin{pmatrix} 1 & a & -a  \\  0 & 1 & 0  \\  0 & 0 & 1 \end{pmatrix}  $$
since 
$$  \begin{pmatrix} \tilde{x}  \\  \tilde{y}  \\  1 \end{pmatrix} = M \cdot \begin{pmatrix} x  \\  y  \\  1 \end{pmatrix} = \begin{pmatrix}  x + ay - a  \\  y  \\  1\end{pmatrix} $$
That is, given coordinates $(x,y)$ of a point of the graph of $y = \cos x$, its image under the shear gives the coordinates $(\tilde{x}, \tilde{y})$ of a point on the graph $\tilde{y} = \cos(\tilde{x}+a\tilde{y}-a)$.
This matrix applies a linear map.  The effect of a linear map on area is given by its determinant -- if the determinant is, say, $2$, the map doubles areas.  So we compute the determinant of our map.  Using he first column for expansion by minors should minimize computation.  We find
$$ \det M = 1 \begin{vmatrix} 1 & 0  \\ 0 & 1 \end{vmatrix} + 0 \cdot | \dots | + 0 \cdot | \dots |  =  1  \text{.}  $$
This says that areas are unchanged when we apply this shear.  Therefore, we only need to be able to integrate the unsheared cosine, but with (reverse) sheared bounds of integration.  A picture might help.
Here's a plot of $y = \cos(x + ay - a)$ with $a = 1/2$.

Say we want the integral from $1$ to $4$.  The left and right edges of the area we want are vertical on this graph. 

But on the unsheared graph, they are not.  

The resulting area is a triangular region on the left, a usual integral between the points where the bounds meet the unsheared cosine graph, plus a traingular region on the right.  (Notice that the left triangular region is negative if the point where it meets $\cos x$ has negative height.  Similarly, for the right endpoint if that line meets cosine at positive height.)
So you integrate this by finding where the unsheared bounds meet the unmodified cosine graph, computing the usual integral between those bounds, then correcting by these two triangle areas.
A: It is possible to compute $\displaystyle \int ydx$ as a purely algebraic function of $y$.
Rearrange to $\displaystyle x = \arccos y -ay + a$ (please take care of the domain-range considerations yourself, if they are a concern).
You can compute $\displaystyle \int xdy$ to be $\displaystyle y\arccos y - \sqrt{1-y^2} - \frac 12 ay^2 + ay + c_1$
You can assume (or show, using integration by parts) that $\displaystyle \int ydx + \int xdy = xy + c_2$
which allows you to write:
$\displaystyle \int ydx = xy - \int xdy + c_2$
$\displaystyle \int ydx = y\arccos y - ay^2 + ay - (y\arccos y - \sqrt{1-y^2} - \frac 12 ay^2 + ay + c_1) + c_2$
$\displaystyle \int ydx = \sqrt{1-y^2} -\frac 12 ay^2 + c$
which is an unexpectedly elegant result.
It does not look trivial to express that purely in terms of $x$ because of the implicit relationship between $y$ and $x$. I hope you can work with this.
Just wanted to add a cautionary note, be careful when computing definite integrals using this relationship . Remember that the integral on the LHS is wrt $x$ but the expression on the RHS involves only $y$. So let's say you wanted a lower bound of $x=0$. This will correspond to $y= 1$, so the value of the integral at the lower bound will be $\displaystyle -\frac 12a + c$. That's the value that will be subtracted off as the lower bound when you work out a definite integral. So $\displaystyle \int_0^X ydx = \sqrt{1-Y^2}-\frac12aY^2+\frac 12a$, where $y=Y$ when $x=X$ by your functional definition. Of course the constant $c$ gets cancelled out.
A: I think this is non-rigorous, but might be made rigorous. Let us calculate the first and second derivatives with respect to $x$. We have
$$
y' = - \sin (x +ay - a) \cdot (1 + ay')
$$
and also
\begin{align*}
y''
&= - \cos (x + ay - a) \cdot (1 + ay')^2 + a y'' (- \sin (x +ay - a)) \\
&= -y (1 + ay')^2 + a y'' \cdot \frac{y'}{1 + ay'}
\end{align*}
Multiplying by $1 + ay'$ and cancelling $ay'y''$ on both sides we get:
$$
y'' = - y (1 + ay')^3,
$$
as I mentioned in the comments. Now, let us try to integrate $y$ with respect to $x$. Notice that
$$
\frac{d}{dx} (1 + ay')^{-2} = (-2) (1 + ay')^{-3} \cdot ay''.
$$
Thus, we have
$$
\int y\ dx
= \int - \frac{y''}{(1 + ay')^3} \ dx 
= \frac{1}{2a} \int \frac{d}{dx} (1 + ay')^{-2} \ dx
= \frac{1}{2a(1 + ay')^2}.
$$
