Finding the value of a trigonometric function given the value of $\tan(\alpha)\tan(\beta)$ Given:
$$\tan{\alpha} \tan{\beta} = -\frac{b^2}{a^2}$$
where $a$ and $b$ are constants, find:
$$\cos^2(\frac{\alpha - \beta}{2})$$
in terms of $a$ and $b$.
Here is my attempt:
$$\frac{\sin{\alpha}\sin{\beta}}{\cos{\alpha}\cos{\beta}} = -\frac{b^2}{a^2}$$
$$\frac{\sin{\alpha}\sin{\beta} + \cos{\alpha}\cos{\beta}}{\sin{\alpha}\sin{\beta} - \cos{\alpha}\cos{\beta}} = \frac{a^2 - b^2}{-a^2 - b^2}$$
$$\frac{\cos(\alpha - \beta)}{\cos(\alpha + \beta)} = \frac{b^2 - a^2}{a^2 + b^2}$$
 A: 
actually this is related to ellipse, the question was "for the ellipse x^2/a^2+y^2/b^2, find the locus of the centroid of the triangle formed by the center and the points of intersection of chord of the ellipse which subtend right angle at the origin". while solving this problem i encountered this trigonometry problem

I understand how you faced the trigonometry problem.
Let $(a\cos\alpha,b\sin\alpha),(a\cos\beta,b\sin\beta)$ be the points on the ellipse. Then, we have
$$\frac{b\sin\alpha}{a\cos\alpha}\cdot\frac{b\sin\beta}{a\cos\beta}=-1\iff \tan\alpha\tan\beta=-\frac{a^2}{b^2}\tag1$$
Let $(x,y)$ be the coordinate of the centroid. Then,
$$x=\frac{0+a\cos\alpha+a\cos\beta}{3},\quad y=\frac{0+b\sin\alpha+b\sin\beta}{3}\tag2$$
and so
$$\begin{align}\left(\frac{3x}{a}\right)^2+\left(\frac{3y}{b}\right)^2&=(\cos\alpha+\cos\beta)^2+(\sin\alpha+\sin\beta)^2\\&=1+1+2(\cos\alpha\cos\beta+\sin\alpha\sin\beta)\\&=2+2\cos(\alpha-\beta)\\&=4\cos^2\left(\frac{\alpha-\beta}{2}\right)\end{align}$$
Now, I think that we cannot represent $\cos^2(\frac{\alpha-\beta}{2})$ only by $a,b$.
So, let us use another approach.
We have
$$\begin{align}\left(\frac{3x}{a}\right)^2+\left(\frac{3y}{b}\right)^2&=(\cos\alpha+\cos\beta)^2+(\sin\alpha+\sin\beta)^2\\&=1+1+2(\cos\alpha\cos\beta+\sin\alpha\sin\beta)\\&=2+2\cos\alpha\cos\beta(1+\tan\alpha\tan\beta)\\&=2+2\cos\alpha\cos\beta\left(1-\frac{a^2}{b^2}\right)\tag3\end{align}$$
From $(1)$, letting $\cos\alpha\cos\beta=P$,
$$\begin{align}\sin\alpha\sin\beta=-\frac{a^2}{b^2}P&\Rightarrow \sin^2\alpha\sin^2\beta=\frac{a^4}{b^4}P^2\\&\Rightarrow (1-\cos^2\alpha)(1-\cos^2\beta)=\frac{a^4}{b^4}P^2\\&\Rightarrow 1-(\cos^2\alpha+\cos^2\beta)+P^2=\frac{a^4}{b^4}P^2\\&\Rightarrow 1-\left(\left(\frac{3x}{a}\right)^2-2P\right)+P^2=\frac{a^4}{b^4}P^2\\&\Rightarrow a^2(b^4-a^4)P^2+2a^2b^4P+b^4(a^2-9x^2)=0\\&\Rightarrow P=\frac{-ab^4\pm b^2\sqrt{a^6+9x^2(b^4-a^4)}}{a(b^4-a^4)}\end{align}$$
Hence, from $(3)$,
$$\left(\frac{3x}{a}\right)^2+\left(\frac{3y}{b}\right)^2=2+2\left(1-\frac{a^2}{b^2}\right)\cdot \frac{-ab^4\pm b^2\sqrt{a^6+9x^2(b^4-a^4)}}{a(b^4-a^4)},$$
i.e.
$$\left(\frac{3x}{a}\right)^2+\left(\frac{3y}{b}\right)^2=\frac{2a^3\pm 2\sqrt{a^6+9x^2(b^4-a^4)}}{a(a^2+b^2)}$$
