Why Does Maximum Range Occur at 45 Degrees?
This topic is part of the HSC Physics syllabus under the section Projectile Motion.
HSC Physics Syllabus

Apply the modelling of projectile motion to quantitatively derive the relationships between the following variables:

Solve problems, create models and make quantitative predictions by applying the equations of motion relationships for uniformly accelerated and constant rectilinear motion
Why 45º Give Maximum Range in Projectile Motion Explained
Understanding Projectile Motion
Projectile motion refers to the motion of an object thrown or projected into the air, subject to only the acceleration of gravity. The object is called a projectile, and its path is called its trajectory.
The Basic Principles

TwoDimensional Motion: Projectile motion is a form of twodimensional motion or motion in a plane. It can be understood as two onedimensional motions, with the horizontal motion having constant velocity and vertical motion experiencing uniform acceleration due to gravity.

Independence of Horizontal and Vertical Motions: The key principle in understanding projectile motion is that horizontal and vertical motions are independent of each other. That means the horizontal motion does not affect the vertical motion and vice versa.
Why 45 Degrees is Optimal for Maximum Range
When a projectile is launched, its velocity can be broken down into two components: horizontal (`v_x`) and vertical (`v_y`). The angle of launch affects these components. `R` is range
 `v` is the initial velocity
 `\theta` is the launch angle
 `g` is the acceleration due to gravity.
To maximise range, we need to maximise the value of `\sin2\theta`. The sine function achieves its maximum value of 1 at an angle of 90 degrees. Therefore, to maximise `\sin2\theta`, $`2\theta`$ should be 90 degrees, which makes `\theta` equal to 45 degrees.