sympy.limit() method in Python

Introduction:

In this tutorial we are learning about the sympy.limit() method in Python. By using the sympy.limit() method, we can easily calculate the limit of any mathematical expression. An example of it is given below -

Syntax:

The syntax of the sympy.limit() method in Python is given in below -

Parameters:

The parameters of the sympy.limit() method in Python is given in below -

  • expression: It is representing a mathematical expression on which we can perform the limit operation. For example, f(x).
  • variable: It represents the variable in a numeric expression. For example, x.
  • value: It represents the value that the limit tends to. For example, a.

Return Value:

The return value of the sympy.limit() method in Python is given in below -

It returns the limit of the math expression based on the given conditions.

Program Code 1:

Here we give a program code of the sympy.limit() method in Python. The code is given below -

Output:

Now we run the above program and find the limit of the given expression which is tends to 0. The result is given below -

The expression is: sin(y)/y
The limit of the given expression which is tends to 0: 1

Program Code 2:

Here we give another program code of the sympy.limit() method in Python. The code is given below -

Output:

Now we run the above program and find the limit of the given expression which is tends to 0. The result is given below -

The expression is: sin(2*y)/y
The limit of the given expression which is tends to 0: 2

Program Code 3:

Here we give another program code of the sympy.limit() method in Python. The code is given below -

Output:

Now we run the above program and find the limit of the given expression which is tends to 0. The result is given below -

The expression is: tan(3*y)/y
The limit of the given expression which is tends to 0: 3