Sympy integrate() does not produce output in the natural form of the common fraction
Question: This code is taken from the Sympy tutorial:

    
    
    init_printing(use_unicode=False, wrap_line=False, no_global=True)
    x = Symbol('x')
    r = integrate(x**2 + x + 1, x)
    
    print(r)
    

The output is: `x**3/3 + x**2/2 + x`

It's correct, but in
[tutorial](http://docs.sympy.org/dev/modules/integrals/integrals.html) the
output was:

    
    
     3    2
    x    x
    -- + -- + x
    3    2 
    

How can I reach this form of output?

_If necessary:**IDE** is pyCharm, **python ver.** is 3.3_


Answer: You need a pretty printer `pprint` instead of normal `print`. Refer the Sympy
Tutorial section
[Printing](http://docs.sympy.org/0.7.0/tutorial.html#printing)

    
    
    >>> from sympy import *
    >>> init_printing(use_unicode=False, wrap_line=False, no_global=True)
    >>> x = Symbol('x')
    >>> r = integrate(x**2 + x + 1, x)
    >>> print(r)
    x**3/3 + x**2/2 + x
    >>> pprint(r)
     3    2    
    x    x     
    -- + -- + x
    3    2
    

**Note** For non string objects, [print
statement](http://docs.python.org/2/reference/simple_stmts.html#the-print-
statement) (Python 2.X) or the [print
function](http://docs.python.org/2/library/functions.html#print) (Python 3.X)
converts the object to string using the [rules for string
conversion](http://docs.python.org/2/library/functions.html#str).

