New compact and singularity free formulations for the magnetic field produced by a finite cylinder considering linearly varying current density