First order approximation of function at $x=y$

Given two unit vectors $$x, y\in S^n$$, is there a way to obtain a 1st order aproximation at $$x=y$$ of the following function?:

$$f(x, y) := \arccos(x^\top y) \frac{y-(x^\top y)x}{\lVert y- (x^\top y) x\rVert}$$

An alternative formulation may be the one resulting from defining $$z := y - (x^\top y) x$$, which leads to

$$f(z) := \arccos(\sqrt{1-z^\top z}) \frac{z}{\lVert z\rVert}$$

Thus, the linearization point becomes $$z=[0, 0, 0]^\top$$. However, I have had no sucess in obtaining a Taylor approximation of $$f(z)$$.

Let $$x^Ty=\cos\theta$$. Then $$\|y-x\cos\theta\|=\sqrt{1-2\cos^2\theta+\cos^2\theta}=\sin\theta$$ and only $$y-x\cos\theta$$ remains. As $$\cos\theta\approx 1-\dfrac{\theta^2}2$$, you can simplify to $$y-x$$.
• Thanks :) Just to check if I understand correctly: Is it right that the result comes from the following limit? $$\lim_{\theta\to0} \theta \frac{y-x\cos(\theta)}{\sin(\theta)} = y-x$$ In that case, why can we "ignore" the $x$ and $y$ terms?
• It must be a misunderstanding from my side. I would greatly appreciate it if you could expand your answer a bit. What I think is blocking me is that, since $\theta$ depends on both $x$ and $y$, I don't understand why we can "disentangle" the terms involving $\theta$ and obtain the first-order approximation of $f$ by independently computing how these terms (those involving $\theta$) behave when $x = y$.
• @abc: we don't need to care as the $\theta$s just vanish out of consideration. Commented Sep 6 at 15:11