Angle between medians in right triangle In a right angled triangle,medians are drawn from the acute-angles to the opposite sides.If maximum acute angle between these medians can be expressed as $tan^{-1}(\frac{p}{q})$ where p and q are relatively prime positive integers.Find $p+q$.
 Let triangle is right angled at B.Let us take B (0,0),C(a,0),A(0,c).Let AD is median from A to opposite side BC.Let CE is median from C to side AB.Coordinates of D are$(\frac{a}{2},0)$,coordinates of E are $(0,\frac{c}{2})$.Slope of AD is $\frac{-2a}{c}$.Slope of CE is $\frac{-a}{2c}.$
Angle between medians$=\frac{\frac{a}{2c}-\frac{2a}{c}}{1+\frac{a^2}{c^2}}$,I am not getting answer,beacause these variables are not cancelling out.
Can someone help me getting the answer?
 A: I think the slope of $AD$ is $\frac{2c}{-a}$ and that the slope of $CE$ is $\frac{-c}{2a}$.
Then, the acute angle between the medians can be expressed as
$$\arctan\frac{\frac{-c}{2a}-\frac{2c}{-a}}{1+\frac{2c}{-a}\cdot\frac{-c}{2a}}=\arctan\frac{3ac}{2a^2+2c^2}=\arctan\frac{\frac{3ac}{a^2}}{\frac{2a^2}{a^2}+\frac{2c^2}{a^2}}=\arctan\frac{3s}{2+2s^2}$$
where $\frac ca=s\gt 0$.
Here, let $f(s)=\frac{3s}{2+2s^2}$. Then, we have
$$f'(s)=\frac{6(1-s)(1+s)}{(2+2s)^2}.$$
So, we have $f(s)\le f(1)=\frac 34$. 
Hence, the maximum acute angle is $\arctan\frac 34$.
A: Just for fun, I'll add an answer which doesn't need calculus. Let $A(-1,0)$, $B(1,0)$ and $C(\cos\theta,\sin\theta)$ the vertices of a right angled triangle and let $O(0,0)$. Medians from $A$ and $B$ intersect median $OC$ at a point $P$ such that $OP=1/3$. If we take $\alpha=\angle OAP$ and $\beta=\angle OBP$, it is then easy to show that $\tan\alpha=(1/3)\sin\theta/(1+(1/3)\cos\theta)$ and $\tan\beta=(1/3)\sin\theta/(1-(1/3)\cos\theta)$.
The acute angle between medians is just $\alpha+\beta$ and a straightforward calculation gives $\tan(\alpha+\beta)=(3/4)\sin\theta$, which attains its maximum $3/4$ for $\theta=\pi/2$.
A: HINT....Your error is in saying that the gradient of $CE$ is $-\frac{a}{2c}$, whereas it should be....what?
