Comment on Activity 2

If we apply the Sum Rule and note that `q^2` is a constant, we find

`d/(dx)[q^2+(D-x)^2]=d/(dx)(D-x)^2`.

Now, `(D-x)^2` is a function of a function to which we can apply the Chain Rule. Specifically, if we write `v=w^2` and `w=D-x`, then `v=(D-x)^2`. The Chain Rule tells us

`(dv)/(dx)=(dv)/(dw)(dw)/(dx)=2w(-1)=-2(D-x)`.

And, since the adding the constant `q^2` does not change the derivative,

`d/(dx)[q^2+(D-x)^2]=-2(D-x)`.

Now, if we write `u=q^2+(D-x)^2` and `z=sqrt(u)`, then

`(dz)/(dx)=(dz)/(du)(du)/(dx)=1/(2sqrt(u)[-2(D-x)])=(x-D)/sqrt(q^2+(D-x)^2`.

In the previous section, we calculated the derivative of `y=sqrt(p^2+x^2)`:

`d/(dx)sqrt(p^2+x^2)=x/sqrt(p^2+x^2)`.

Finally, we find that

`d/(dx)L(x)=(dy)/(dx)+(dz)/(dx)=x/sqrt(p^2+x^2)+(x-D)/sqrt(q^2+(D-x)^2)`.