<s>[INST] An equation relating sine of angles in a triangle I wanted to solve the following problem.

In $\triangle ABC$ we have $$\sin^2 A + \sin^2 B = \sin^2 C + \sin A \sin B \sin C.$$ Compute $\sin C$.

Since it's an equation for a triangle, I assumed that $\pi = A + B + C$ would be important to consider.
I've tried solving for $\sin C$ as a quadratic, rewriting $\sin C = \sin (\pi - A - B)$, but nothing seemed to work.
How does one approach this problem? Any help would be appreciated.
The answer is

$$\frac{2\sqrt{5}}{5}$$

 [/INST] using the Theorem of sines we get
$$\sin^2(C)\left(\frac{a^2+b^2}{c^2}\right)=\sin^2(C)+\frac{ab}{c^2}\sin^3(C)$$
since $$\sin(C)\neq 0$$ we obtain
$$\sin(C)=\frac{a^2+b^2-c^2}{ab}$$ using $$2\cos(C)=\frac{a^2+b^2-c^2}{ab}$$ we get $$\tan(C)=2$$
</s>