the first few steps from sympy import xy symbols(' ' * print which causes the symbolic result * to appear on the screen note that no numerical value was assigned to any of the variables in the symbolic computation only the symbols were usedas when you do symbolic mathematics by hand on piece of paper symbolic computations in python make use of the sympy package each symbol is represented by standard variablebut the name of the symbol must be declared with symbol(namefor single symbolor symbols(name name for multiple symbols the following script example_symbolic py is quick demonstration of some of the basic symbolic operations that are supported in python from sympy import symbol(' ' symbol(' 'print * * algebraic computation print diff( ** xdifferentiates ** wrt print integrate(cos( )xintegrates cos(xwrt print simplify(( ** ** )/ ** simplifies expression print limit(sin( )/xx finds limit of sin( )/ as -> print solve( * xsolves * other symbolic calculations like taylor series expansionlinear algebra (with matrix and vector operations)and (somedifferential equation solving are also possible symbolic computations are also readily accessible through the (partlyfree online tool wolframalpha which applies the very advanced mathematica package as symbolic engine the disadvantage with wolframalpha compared to the sympy package is that the results cannot automatically be imported into your code and used for further analysis on the other handwolframalpha has the advantage that it displays many additional mathematical results related to the given problem for exampleif we type in wolframalphait not only simplifies the expression to ybut it also makes plots of the function fr xr yd ysolves the equation and calculates the integral /dxdy the commercial pro version can also show step-by-step of the analytical computations in the problem you are strongly encouraged to try out these commands in wolframalphadiff( ^ xor diff( ** xintegrate(cos( )xsimplify(( ** ** )/ **