Make build_extension() use dummy symbols by default in sympy/integrals/risch.py

Otherwise, we might run into trouble (risch) integrating functions with
symbolic coefficients named t0, t1, ...!
Fix bug in build_extension() with exponents with symbolic bases
Many fixes in is_log_deriv_k_t_radical_in_field() in sympy/integrals/prde.py

This includes implementing the hyperexponential case, fixing wrong
result bugs (the algorithm was wrong), and adding a cancel option to
frac_in() in sympy/integrals/risch.py, for convenience.
Fix a bug in spde() in sympy/integrals/rde.py

quo is not the proper way to do a/b where a and b are Polys and
b.degree() == 0, because it only works when the ground domains of a and
b are fields.  Ideally, Poly would have a .mul_ground() method to make
this easier, but for now, just do Poly(a.as_basic/b.as_basic()) instead.
Merge remote branch 'mattpap/polys11' into integration3

This was a serious merge, and it's quite possible that something was
done wrong.  But all tests pass that passed before in both branches
(i.e., there are test failures, but they either come from the "HACK:
Temporarily disable algebraic substitution in exp for risch_integrate()"
commit, or else they are doctest failures in non-gmpy/Python2.7 from
polys11).

See issue 2010 for more information on why this merge was necessary.

Conflicts:
	sympy/integrals/integrals.py
	sympy/polys/algebratools.py
	sympy/polys/densearith.py
	sympy/polys/densebasic.py
	sympy/polys/densetools.py
	sympy/polys/galoistools.py
	sympy/polys/groebnertools.py
	sympy/polys/polyclasses.py
	sympy/polys/polyoptions.py
	sympy/polys/polytools.py
	sympy/polys/rootoftools.py
	sympy/polys/tests/test_densetools.py
	sympy/polys/tests/test_domains.py
	sympy/polys/tests/test_polytools.py
	sympy/utilities/__init__.py
	sympy/utilities/runtests.py
	sympy/utilities/tests/test_iterables.py
Fix a workaround in a test_risch.py test that works now that polys11 is merged

For the rde.py change, I was going to also use .mul_ground() from
polys11, but that doesn't seem to work:

In [1]: Poly(x*t, t).mul_ground(1/x)
...
PolynomialError: 1/x contains an element of the generators set
Add cancel_primitive() and primitive case in bound_degree() in Risch Algorithm

Also includes some other bug fixes.  This needs more tests, but so far,
this is a great improvement, and risch_integrate() is now able to do
many more integrals that previously raised NotImplementedError.  For
example:

In [1]: risch_integrate(diff(exp(2*x**2)*log(x)*log(x + 1), x), x)
Out[1]:
    2
 2⋅x
ℯ    ⋅log(x)⋅log(1 + x)

(by the way, it fails in the old integrate()).

More importantly, this is the last official commit for the 2010 Google
Summer of Code coding period.  I want to take this opportunity to thank
Google for having such a wonderful program, the Python Software
Foundation for accepting my project this year, and the SymPy development
team for their support, especially Chris Smith for his advice and my
mentor Mateusz Paprocki, because this project would have been impossible
without his excellent Polynomials module.

Note that even though this is the end of the official coding period for
GSoC, my project is far from over, and I plan on continuing to work on
it until it is completely implemented and merged, and I also plan on
doing more work on symbolic integration in SymPy beyond even that.
Fix a bug with build_extension(sin(y)*exp(x), x) in sympy/integrals/risch.py

Previously, it was raising NotImplementedError("Trigonometric
expressions are not supported") whenever the expression had a trig
function in it, when really it should only do that whenever it has a
trig function that depends on the integration variable.
Use the expand=False option to Poly somewhere in risch.py

Expansion isn't necessary here, and it is slowing things down in some
cases, like risch_integrate(cancel(exp(x)/x + diff(exp(x)/(x**2 + 1),
x)), x).
Cancel non-elementary integrands in the Risch Algorithm

This makes them look nicer.
Fix a bug in integrate_hyperexponential_polynomial(), and add a test
Use apart in a few places in integrate_hyperexponential() to make as_poly work

This is just a stand-in fix for issue 2032 (Ability to work with
K[x, 1/x] in Polys).  Also add a test from Christian Muise's automatic
test generating script.
Fix the wronskian() docstring to use correct derivative notation
Fix a typo in the _solve_variation_of_parameters() docstring in ode.py
Fix a bug with ratint(diff(x/4 - 4/(1 - x), x), x)
Add a cancel() line to integrate_hyperexponential_polynomial() in risch.py

Also add a test.  If this test ends up being too slow, it can probably
be removed.
Reorganize code in build_extension() in risch.py

This does not change the code at all, it just moves it around a bit.
Use the expand=False to some calls to Poly in rde.py

This is for speed reasons, because the resulting expression should
already be in the correct form to create a Poly, so calling expand() can
be an expensive redundancy.
Use .to_field.quo instead of (.as_basic()/.as_basic()).as_poly in rde.py

See issue 2031.
Use Df == 0 instead of not f.has_any_symbols(*T) to test if f is a constant