import math
def equation(a):
return 7*a - (math.cos((3/8)*math.pi - (a/4))**2 - math.cos((11/8)*math.pi + (a/4))**2)
def find_answer(a0, t=1e-5, max_iter=100):
a = a0
for i in range(max_iter):
a1 = a - equation(a) / (7 - 2*(math.cos((3/8)*math.pi - (a/4))**2 - math.cos((11/8)*math.pi + (a/4))**2))
if abs(a1 - a) < t:
return a1
a = a1
return a
a0 = 1.0
answer = find_answer(a0)
print("Корень уравнения равен:", answer)
катит?