For vertically upward motion of a projectile, y=(usinα)t−21gt2
or h=(usinα)t−21gt2
or gt2−(2usinα)t+2h=0 ...(i) ∴t1=2g2usinα±(4u2sin2α)−8gh
If two roots of quadratic Eq. (i) are t1,t2, then t=2g2usinα+(4u2sin2α−8gh
and t2=2g2usinα−(4u2sin2α)−8gh
If particle crosses the walls at times t1 and t2 respectively, then time of flight t is t=t1t2
or t2=t1t2 ∴(g2usinα)2=4g2(2usinα)2−(4u2sin2α−8gh)
or g24u2sin2α=4g28gh
or 2u2sin2α=gh
Given, u=2gh ∴2(2gh)sin2α=gh
or sin2α=41
or sinα=21 ∴α=30∘