Let H be the total height of the water in the tank, so H = 12 m.
Let the hole be made at a depth 'h' from the surface of the water.
The height of the hole from the ground is $(H - h)$.
According to Torricelli's law, the velocity of efflux (v) of the water from the hole is:
$v = \sqrt{2gh}$.
After emerging from the hole, the water stream acts as a projectile with zero initial vertical velocity.
The time (t) it takes for the water to strike the ground can be found from the vertical motion equation: $s = ut + \frac{1}{2}at^2$.
Here, $s = H - h$, $u = 0$, $a = g$.
$H - h = \frac{1}{2}gt^2 \implies t = \sqrt{\frac{2(H - h)}{g}}$.
The horizontal range (R) is the horizontal distance traveled in this time.
$R = v \times t = \sqrt{2gh} \times \sqrt{\frac{2(H - h)}{g}}$.
$R = \sqrt{4h(H - h)} = 2\sqrt{h(H - h)}$.
To find the value of 'h' for which the range R is maximum, we need to maximize the function $f(h) = h(H - h) = Hh - h^2$.
We can find the maximum by taking the derivative with respect to 'h' and setting it to zero.
$\frac{df}{dh} = \frac{d}{dh}(Hh - h^2) = H - 2h$.
Set $\frac{df}{dh} = 0$:
$H - 2h = 0 \implies 2h = H \implies h = \frac{H}{2}$.
Given H = 12 m, the depth 'h' for maximum range is:
$h = \frac{12}{2} = 6$ m.