File: series.py

package info (click to toggle)
sympy 1.13.3-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 36,612 kB
  • sloc: python: 453,064; xml: 359; makefile: 161; sh: 59; lisp: 4
file content (28 lines) | stat: -rwxr-xr-x 417 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python

"""Series example

Demonstrates series.
"""

from sympy import Symbol, cos, sin, pprint


def main():
    x = Symbol('x')

    e = 1/cos(x)
    print('')
    print("Series for sec(x):")
    print('')
    pprint(e.series(x, 0, 10))
    print("\n")

    e = 1/sin(x)
    print("Series for csc(x):")
    print('')
    pprint(e.series(x, 0, 4))
    print('')

if __name__ == "__main__":
    main()