I've been trying to find the electric Field on the Z-axis from a non-uniform charge density line charge. The wire is placed on the z-axis from $z=0$ to $z=1$, $E=?$ at $z>1$ and $z<0$
$$ \rho =2z $$
Here is my thought process:
$$ P_{1} = (0,0,z), P_{2} = (0,0,-z) $$ $$ \vec{a_1}=(z-1)\hat{z},\vec{a_2}=-z\hat{z} $$ $$ \hat{a_{1,2}}=\hat{z} $$ $$ E_r=\frac1{4πϵ_0} \int_{}^{} \hat{a_{1,2}} *\frac\rho{R^2} \,dl $$ $$ E_{z>1}=\frac1{4πϵ_0} \int_{0}^{1} \hat{z} *\frac{2z}{(z-1)^2} \,dz $$ $$ E_{z>1}=\frac1{4πϵ_0} [ln{|z-1|}-\frac1{z-1}] \,\begin{matrix} 1\\ 0 \end{matrix} $$ Now I reach where I have an issue. I get an undefined Electric Field, I think I messed up on the setup, but i don't know where. Any help is appreciated