Derivation of equation of path difference in double slit 

$p$ = Path difference
$r$ = Distance travelled by the rays
$x$ = Perpendicular distance between interference of the rays to the medium point of the incident rays
$a$ = Vertical distance between the incident rays
$D$ = Horizontal distance



I knew that
$r_2-r_1 = p \tag{1} $
$r_1^2 = D^2+(x-a/2)^2 \tag{2}$ 
$r_2^2 = D^2+(x+a/2)^2 \tag{3}$
$(3)-(2) = r_2^2-r_1^2 = (r_2-r_1)(r_2+r_1)=2ax \tag{4}$ 
$(4) = (r_2-r_1)(r_2+r_1) = 2pD \tag{5}$ 
$$(4) = (5) = 2pD = 2ax$$
Hence path difference $p =ax/D$



The question is why $(r_2+r_1) = 2D$ ?

 A: Here's how I go about it. Let's call the middle point of the 2 slits point $A$. Also, let's call the angle between the line joining $A$ to the point of the central maxima ( on the screen, horizontally infront of $A$) and $A$ to the point on the screen under observation $\theta$.

Now, since the slits and the distance between $a$ them are very very small as compared to the distance $D$ between the slits and the screen, the 2 light paths $r_1$ and $r_2$ may be considered almost parallel.

In that case the path difference becomes $a sin\theta$ as is evident from the image. On the other hand, from the bigger triangle, $sin\theta \approx tan\theta = \frac{x}{D}$
because $\theta$ is very small.
So you get path difference $p = \frac{ax}{D}$.
There are a lot of approximations, but they work well under suitable conditions. (When $\theta$ is very small, that is, $x \ll D$ and $a \lll D$.)
A: Here we should have to relate the slit width w,distance from the screen D ,wave length lambda
Where the wave length is the path difference
w/wave length=x/D
