Deriving a generic formula:

Hello MHF community,

For my first post to this website, leave it to me to ask a very silly question. I am going to write what I know (which is incorrect). I am just missing some basic rules on how to solve equations to make it work, and I am hoping you can fill it in.

I am trying to derive a generic formula for finding the altitude for an equilateral triangle. I know this:

http://i931.photobucket.com/albums/a...ongformula.gif

I know this is incorrect because when I graph the equilateral triangle, the height of the point does not fall where my formula suggests it will. So I went looking on the internet to find what I was doing wrong. However, the internet has just the answer to my question. Not the **reason why** my formula is wrong. Can you please help?