Python | sympy.series() method
With the help of sympy.series()
method, we can find the series of some mathematical functions and trigonometric expressions by using sympy.series()
method.
Syntax : sympy.series()
Return : Return a series of functions.
Example #1 :
In this example we can see that by using sympy.series()
method, we are able to find the series of some trigonometric functions.
from sympy import *
x, y = symbols( 'x y' )
gfg = cos(x).series()
print (gfg)
|
Output :
1 – x**2/2 + x**4/24 + O(x**6)
Example #2 :
from sympy import *
x, y = symbols( 'x y' )
gfg = tan(x).series()
print (gfg)
|
Output :
x + x**3/3 + 2*x**5/15 + O(x**6)
Last Updated :
02 Aug, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...