Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def intg(n, x):
- if n > 2:
- return cos(x) ** (n-1) * sin(x) / n + (n-1 / n) * intg(n-2, x)
- if n == 2:
- return x/2 + 1/4 * sin(2*x)
- if n == 1:
- return sin(x)
- n = int(input('Введите показатель n: '))
- a, b = [int(x) for x in input('Введите границы интегрирования а(от) и b(до): ').split()]
- print('Определенный интеграл равен:', intg(n, b) - intg(n, a))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement