The range of a projectile isR = v0^2*sin(2*theta)/gwhere v0 is its initial velocity, g is the acceleration due to gravity and is a constant, and theta is its firing angle. Find the angle that maximizes the projectile's range.

I know the answer is 45 degrees, but I'm confused as to how to arrive at that answer using optimization.