  The cable equation describes the voltage in a straight cylindrical cable,
this model has been employed to model electrical potential in dendrites and
axons. However, sometimes this equation might give incorrect predictions for
some realistic geometries, in particular when the radius of the cable changes
significantly. Cables with a non constant radius are important for some
phenomena, for example discrete swellings along the axons appear in
neurodegenerative diseases such as Alzheimer, Parkinson, HIV-associated
dementia and Multiple Sclerosis. In this paper, using the Frenet-Serret frame,
we propose a generalized cable equation for a general cable geometry. This
generalized equation depends on geometric quantities such as the curvature and
torsion of the cable. We show that when the cable has a constant circular
cross-section, the first fundamental form of the cable can be simplified and
the generalized cable equation depends on neither the curvature nor the torsion
of the cable. Additionally, we find an exact solution for an ideal cable which
has a particular variable circular cross-section and zero curvature. For this
case we show that when the cross-section of the cable increases the voltage
decreases. Inspired in this ideal case, we rewrite the generalized cable
equation as a diffusion equation with a source term generated by the cable
geometry. This source term depends on the cable cross-section area and its
derivates. In addition, we study different cables with swelling and provide
their numerical solutions. The numerical solutions show that when the
cross-section of the cable has abrupt changes, its voltage is smaller than the
voltage in the cylindrical cable. Furthermore, these numerical solutions show
that the voltage can be affected by geometrical inhomogeneities on the cable.
