\[ \int \frac {e^{n \tanh ^{-1}(a x)}}{c-a^2 c x^2} \, dx \]
Optimal antiderivative \[ \frac {{\mathrm e}^{n \arctanh \left (a x \right )}}{a c n} \]
command
integrate(exp(n*atanh(a*x))/(-a**2*c*x**2+c),x)
Sympy 1.10.1 under Python 3.10.4 output
\[ \begin {cases} \frac {x}{c} & \text {for}\: a = 0 \wedge n = 0 \\- \frac {\log {\left (x - \frac {1}{a} \right )}}{2 a c} + \frac {\log {\left (x + \frac {1}{a} \right )}}{2 a c} & \text {for}\: n = 0 \\\frac {x}{c} & \text {for}\: a = 0 \\\frac {e^{n \operatorname {atanh}{\left (a x \right )}}}{a c n} & \text {otherwise} \end {cases} \]
Sympy 1.8 under Python 3.8.8 output
\[ \begin {cases} \tilde {\infty } x & \text {for}\: c = 0 \wedge n = 0 \\\tilde {\infty } \int e^{n \operatorname {atanh}{\left (a x \right )}}\, dx & \text {for}\: c = 0 \\- \frac {\log {\left (x - \frac {1}{a} \right )}}{2 a c} + \frac {\log {\left (x + \frac {1}{a} \right )}}{2 a c} & \text {for}\: n = 0 \\\frac {e^{n \operatorname {atanh}{\left (a x \right )}}}{a c n} & \text {otherwise} \end {cases} \]________________________________________________________________________________________