Calculus with Mathsend

How to use differentiate, integrate, limit, and series keywords

Calculus with Mathsend

Calculus operations range from simple one order differential equations to complex ones, and sometimes the aim is just to get the final value, in those scenarios Mathsend relies on sympy to give accurate results through the keywords below:

  1. Differentiate()
  2. Integrate()
  3. Limit()
  4. Series()


The formats:

  1. differentiate(expression)
  2. differentiate(expression, var)

The variable argument may be omitted if there is only one variable in the expression, and partial differentials can be performed by specifying the intended variable.
For example,

  1. differentiate(sin(x)*exp(x)). will differentiate with respect to x
  2. differentiate(2x*y^2+3y +z, y) will yield a solution for when the function is differentiated with respect to y while other variables (x and z) are constants.


MathSend can provide solution to both definite and indefinite integrals. Formats:

  1. integrate(expression)
  2. integrate(expression, variable)
  3. integrate(expression, var1, var2, ...)
  4. integrate(expression, variable, lower_limit, upper_limit)

The variable argument may be omitted if there is only one variable in the expression, but must be specified if there is more than one (e.g x and y). Multiple integrals can also be performed by specifying the order of the variable, and for definite integrals, the lower_limit and upper_limit are required.

For example,

  1. integrate(3*x^4) will integrate expression with respect to x
  2. integrate(3*y/x^4+8yxz, y) will integrate with respect to y
  3. integrate(3*y/x^4+8yxz, y, x,x,z) integrates the expression four times: first with respect to y, second with respect to x, third with respect to x again, and forth with respect to z.
  4. integrate(3*y/x^4+8yxz, y, 0, inf) will integrate the expression with respect to y from 0 to infinity


Mathsend computes Limits to a supplied function using Gruntz heuristics and algorithm.

  1. limit(expression)
  2. limit(expression, variable)
  3. limit(expression, variable, lower_limit, upper_limit)
    For example: limit(x*sin(1/x), x, inf)


Asymptotic series expansions can be computed with the series keywords.
The formats:

  1. series(expression)
  2. series(expression, variable)
  3. series(expression, variable, lower_limit, upper_limit)
    By default, lower_limit = 0, and upper_limit = 6

For example:

  1. series(sin(x)) computes the Taylor series of sin(x) up to the 6th order and it is equivalent to series(sin(x),x,0,6)
  2. series(sin(2x+2xy^2), y, 2, 9) will compute the series with respect to y starting from the 2nd to the 9th.

Did you find this article valuable?

Support Ewetoye, Ibrahim by becoming a sponsor. Any amount is appreciated!