Почему n = 0? В функции n вообще игнорируется, как можно это исправить?
import logging
import math
def row(x, fun, eps):
row = 0.00
diff = 1.00
temprow = 0.00
for n in range(eps < abs(diff)):
row += (pow(-1, n+1) * pow(x, 2 * n+1))/(2 * n+1)
temprow = (math.pi / 2) + row
diff = row - temprow
print(fun, '\t', x, '\t', n, '\t', row)
arg = -1.00
fun = 0.00
dx = 0.25
epsilon = 0.00
print('Xst, Xnd, e: \n')
x1 = float(input())
x2 = float(input())
epsilon = float(input())
print('\t Fun \t x \t n \t row\n')
while (x1 < x2 + dx):
arg = x1
fun = (math.pi / 2) - math.atan(x1)
row(arg, fun, epsilon)
x1 += dx
Вводятся значения: -1, 1, 0.001