# What is the function $q$ in the definition of charge density?

Supposed we define $$\lambda = \frac{dq}{dl}$$. If I think of this intuitively, this makes sense; the linear charge density at a point is tiny amount of charge at that point divided by the tiny length that charge occupies.

However, if we formalize this, it starts to make less sense to me. If $$\lambda = \frac{dq}{dl}$$, then what is $$q(l)$$? After all, derivatives are only mathematically defined for functions. One idea that I had, that may be wrong, is defining $$l=0$$ to be one end of the line and $$l=L$$ at the other end. Then $$q(l$$) is the accumulation of charge from $$0$$ to $$l$$.

This does seem to agree with the intuitive perspective of $$\lambda$$. However, issues arise when you try to use it.

For example, let's say I want to integrate over a continuous charge distribution to find the force on a test charge.

We have $$F(q) = \frac{1}{4\pi\epsilon _0}\frac{qq_{test}}{r^2} \implies \frac{dF(q)}{dq} = \frac{1}{4\pi\epsilon _0}\frac{q_{test}}{r^2}$$

Note that $$q$$ in this context is clearly not the function $$q(l)$$ we discussed earlier. Specifically $$q$$ in this context is referring single charge whereas $$q(l)$$ was some accumulation of charge.

Yet, I always see $$\frac{dF(q)}{dq} = \frac{1}{4\pi\epsilon _0}\frac{q_{test}}{r^2} \implies dF(q) = \frac{1}{4\pi\epsilon _0}\frac{q_{test}}{r^2}dq\implies dF(q)\frac{1}{4\pi\epsilon _0}\frac{q_{test}}{r^2}\lambda dl$$

Can someone explain this to me?

• @AaronStevens let’s say we adopt your definition. Then for constant $\lambda$ we should have $q(l)$ be constant. But then $\frac{dq}{dl}$ = $0$ since the derivative of a constant is 0. But then this means $\lambda$ is 0 which is a contradiction. – Typical Highschooler Oct 15 '19 at 16:56
• Can you expand on your "Yet I always see..." What system is that looking at specifically? – Aaron Stevens Oct 15 '19 at 17:59
• Related question. Please see my answer there regarding the derivatives in the context of electrostatics. I think you are getting confused with how $q$ is being used in different contexts. – Aaron Stevens Oct 15 '19 at 18:19