Comment on Activity 4

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

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

Now, `text[(]D-xtext[)]^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=text[(]D-xtext[)]^2`. The Chain Rule tells us

`(dv)/(dx)=(dv)/(dw)(dw)/(dx)=2w(-1)=-2text[(]D-xtext[)]`.

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

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

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

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

In Example 2, 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)Ltext[(]xtext[)]=(dy)/(dx)+(dz)/(dx)=x/sqrt(p^2+x^2)+(x-D)/sqrt(q^2+text[(]D-xtext[)]^2)`.