Find the maximum angle possible $P$ is a point on the $Y-axis$ . Find the maximum possible value of $\angle APB$ where $A=(1,0)$ and $B=(3,0)$. 
Here is how I solved the problem. Suppose $P=(0,k)$ .  Then using the cosine formula we get  $\cos\angle APB$ as a $f(k)$ . Then differentiating the function for finding maxima and minima, I got the answer. But this is a very lengthy process because $f(k)$ is a little complicated and then differentiating it makes it a lot more worse.
Can anyone tell me a simpler way to solve the problem?
 A: Outline:  The angle is $\arctan(3/k)-\arctan(1/k)$. Differentiate, and set the derivative equal to $0$. After some cancellation we get $3\frac{1}{\sqrt{1+(3/k)^2}}=\frac{1}{\sqrt{1+(1/k)^2}}$. Solve. The algebra is straightforward (flip over and square both sides).
A: The angle $\alpha:=\angle APB$ is equal to $\angle AQB$ where $Q$ is a point on the circle passing through $A$, $B$ and $P$; let $M$ be its center.  We know that $2\alpha=\angle AMB$ and that the first coordinate of $M$ is $2$.  So the smaller the second coordinate $y_M$ of $M$ the bigger $\alpha$ becomes.  The smallest value of $y_M$ such that $P$ is an element of the second coordinate axis occurs when $PM$ is horizontal, hence $\overline{PM}=\overline{MA}=\overline{MB}=2$. As $\overline{AB}$ equals $2$ as well, $\alpha=\pi/6$.
Edit (clarify the position of $P$): If the circle intersects the second coordinate axis in $P_1$ and $P_2$ then $\angle AP_1B=\angle AP_2B$ and $\angle AP_3B$ is greater than that angle for $P_3$ between $P_1$ and $P_2$.  Hence the second coordinate axis must be tangent to the circle.
PS: you may generalize the question in case $A(a,0)$ and $B(b,0)$ where $0<a<b$. You'll receive $\sin(\alpha)=(b-a)/(b+a)$.
