I need some help getting a formula. I remember in class u get this really wierd looking equation like

Vicosg-((vsin(pheta))/2g)
I think this is what the equatin is when I'm asked to

"Derive a formula for the Range of a projectile based on Vi and the Launch angle, pheta. State when and why is this equation at a maximum."

I'm not exactly sure what it means by maximum or how to derrive the forumula. I think what I wrote above is what i am suppose to eventually get I'm just nore sure how to get that and what it means by maximum...