\(\lambda=\cfrac{Q}{x}\) then,
\(\cfrac{\partial\lambda}{\partial x}=\cfrac{\partial}{\partial x}\left\{\cfrac{Q}{x}\right\}=-\cfrac{Q}{x^2}=-J\)
\(x\) is in a direction perpendicular to \(r\). One way to interpret the negative sign is to see that \(x\) is rotated twice anticlockwise 90o about the right hand axis. This may be the reason why \(i\) is abandoned, because \(i*iJ=-J\) is ambiguous. \(-J\) should be in the negative \(J\) direction not \(x^{'}\).
Since the E field due to a line of charges of line charge density \(\lambda\) is,
\(E=\cfrac{\lambda}{2\pi\varepsilon_o r}\) outwards,
\(E_i=-\cfrac{\lambda}{2\pi\varepsilon_o r}\) inwards,
Because the expression for \(B\) was written for \(E\) inwards with a negative sign to conform with the right hand rule.
\(\boxed{-i\cfrac{\partial E_i}{\partial x^{'}} =} \cfrac{\partial( i.-E_i )}{\partial x^{'}}=-i\cfrac{\partial E_i}{\partial x}=-i\cfrac{1}{2\pi\varepsilon_o r}.\cfrac{-\partial\lambda}{\partial x}=-i\cfrac{J}{2\pi\varepsilon_o r}=B\)
\(-i\cfrac{\partial E_i}{\partial x^{'}}\) is wrong.
as before with the understanding that \(B\) is orthogonal to \(J\), by the right hand rule. The field \(E\), is established by the moving charges \(q\) in \(J\), it is not the emf pushing the charges along the line. \(B\) is orthogonal to both \(E\) and \(J\) by the right hand rule.
Maybe it is best to calculate for absolute values and then apply the right hand rule to find direction of the vectors involved separately. So,
\(B=-\cfrac{dE}{dx}\)
where E is perpendicular to B and conforms to the right hand rule. And \(dx\) is along B.