# Compute ∫sin(x^2)dx with one line code? Possible with symbolic computation

Symbolic programming is not a new concept. Most of the computer science and IT engineers would have done some concepts from LISP that in fact supported 'symbolic programming'. This area of symbolic computation has become very vital in the field of robotics and AI as it takes away the complexity of coding when making a robot. We had earlier blogged on the use of Python and the top Python packages. If you have missed the blog then you may read it here.

Symbolic computation has become very vital in the field of robotics and AI as it takes away the complexity of coding when making a robot

Symbolic computation deals with the computation of mathematical objects symbolically. This means that the mathematical objects are represented exactly, not approximately, and mathematical expressions with unevaluated variables are left in symbolic form. In this blog video, we use the open-source Python package SymPy. You simply have to click the area near run code block and that would compute the integral of sine x squared from minus infinity to positive infinity. The code block is just one line as we promised as below :

integrate(sin(x**2), (x, -oo, oo))

And boom you see the result as :

(√2√π)/2

The mathematical objects are represented exactly, not approximately, and mathematical expressions with unevaluated variables are left in symbolic form.

When you click the code block run option - this makes the symbolic computer trigger in SymPy live console and the easiest part is that you can try this without any installation at all. Now tell me what may stop us from learning Robotics? Now this was easier than doing the same in a scientific calculator. Come on be honest now :)

source: http://docs.sympy.org/latest/tutorial/intro.html#

See All