The words cosign, cosine sound the same but have different meanings and spellings. Why do cosign, cosine sound the same even though they are completely different words?
The answer is simple: cosign, cosine are homophones of the English language.
To sign (a document) jointly.
To endorse (another's signature), as for a loan.
In a right triangle, the ratio of the length of the side adjacent to an acute angle to the length of the hypotenuse.
The abscissa at the endpoint of an arc of a unit circle centered at the origin of a Cartesian coordinate system, the arc being of length x and measured counterclockwise from the point (1, 0) if x is positive or clockwise if x is negative.
Definitions from The American Heritage® Dictionary of the English Language, 4th Edition and Wordnik.
Homophones (literally "same sound") are usually defined as words that share the same pronunciation, regardless of how they are spelled.
If they are spelled the same then they are also homographs (and homonyms); if they are spelled differently then they are also heterographs (literally "different writing").