I'm working through a book on relativity so this may end up being a physics question but I'm pretty sure that my problem is mathematical so I'm asking here. In deriving the "special Lorentz transformations", (where the axes of the second coordinate system, $S'$ are parallel to the those of the first, $S$, and movement is along the $x$, $x'$ axes with velocity $v$) the author notes that because $y = y'$ and $z = z'$, the requirement
$$ x_1^2 + x_2^2 + x_3^2 - (ct)^2 = x_1'^2 + x_2'^2 + x_3'^2 - (ct')^2 $$ reduces to $$ x_1^2 - (ct)^2 = x_1'^2 - (ct')^2 $$ and introduces the variables $$ x_4 = ict, x_4' = ict' $$ to get $$ x_1^2 + x_4^2 = x_1'^2 + x_4'^2 $$ giving $$ \begin{eqnarray} x_1' &=& x_1\cos\phi + x_4\sin\phi\\ x_4' &=& -x_1\sin\phi + x_4\cos\phi\\ \end{eqnarray}. $$
A point at rest in $S$, i.e. for which $\frac{dx_1'}{dx_4'} = 0$ must then have $\frac{dx_1}{dx_4} = \frac{-iv}{c}$. The author is using the notation for single variable derivatives here. It seems to be that they should be partials. From here, he says that the transformation rules given above imply $$ \frac{dx_1}{dx_4'} = \frac{\frac{dx_1}{dx_4}\cos\phi + \sin\phi}{-\frac{dx_1}{dx_4}\sin\phi + \cos\phi} $$
I can't get this. I've tried inverting the transformation and taking the total derivative $$ \frac{dx_1}{dx_4'} = \frac{\partial x_1}{\partial x_4'} + \frac{\partial x_1}{\partial x_1'}\frac{dx_1}{dx_4'} = -\sin\phi $$ because $\frac{dx_1'}{dx_4'} = 0$.
Treating it like a partial gets the same result. Implicitly differentiating and solving for the derivative gets the same result as well. I can't get any result other than $-\sin\phi$
How an I supposed to take this derivative? Thanks for any pointers!