I wanted to know how to find a specific angle based on a function and a circle intersection. To understand, you first need to see the drawing :
What I want is to find the smaller alpha angle possible value where the arc-circle drawn by this angle 'cut' a random function. The origin of the circle is $O(0, 0)$ and the radius is $1$ (but I don't think the radius would impact the calcul).
I first thought about how I could find this angle if the function was linear: $y=ax+b$.
When $a \ne 0$ there are some equations :
- $ax + b = 0$
- $x^2+y^2=R^2$ (with R the circle radius)
- $\cos{\alpha}=x$
- $\sin{\alpha}=f(x)$
and the solutions are : $$x = {-ab \pm \sqrt{-b^2+R^2+a^2R^2} \over 1+a^2}.$$ This worked with $R = 1$. You just have to set $\alpha=\arccos{x}$.
So I thought about guessing the intersection between the tangent of the function at the value $a.$
This gave me two equations : $y=f(x)$ and $x^2+y^2=R^2.$
The first gives that tangent line : $y = xf'(x)+(f(a)-f'(x)a)$.
So I solved the same system and found : $$x = {-f'(x)[f(a)-f'(x)a] \pm \sqrt{-[f(a)-f'(x)a]^2+R^2+f'(a)^2R^2} \over 1+f'(a)^2}.$$
This equation is true when $f(x) = ax + b$, because if you replace everything by those values, you get the previous correct equation. But this new $x$ value is not right and I don't know why....
Maybe there is an easier way to solve my problem... Anyway thanks for trying helping me :).
Edit 1 : An algorithm will do the job too if the mathematical solution is too hard to find (I'm using Java).
Edit 2 : So, since there is an infinite number of possibilities which may answer the question as impossible, do you think there is an algorithm capable to find that angle ?

Recast the question in polar coordinates.
You are looking for the point that satisfies
$$x^2+f^2(x)=1$$
while it minimizes
$$\arctan\frac{f(x)}x.$$
Except for a few specific cases (linear or quadratic polynomial, homography and a few others), the root of the first equation don't have a closed-form expression and you will need to resort to numerical methods.
Unfortunately, there is no general numerical method that can guarantee to find the "first" solution. You need to exploit some known property of $f$.