Test for log(1,1)
unXFAIL passing 2706
3269: powsimp corrected for is_negative/is_nonnegative issue

if is_negative is False, this does not mean that is_nonnegative is True
remove dead code from powsimp
factor_terms recurses
3270: explicitly drop x-independent terms; use cancel

In the case of an indefinite integral, the constant portion of the result can
be absorbed into the constant of integration (which sympy does not report).
cancel is now used to make sure that a constant (independent of x) is not
lurking in the expression like that which was identified in the docstring.
edit integral-related docstrings
multiplicity: raise error if base is 1
Better fix for log(x,1) and special case log(1,1)
powsimp: don't assume expr type is known; tidy up code

In the Mul-handling of the '# combine is 'base'' block, expand_mul
is applied to expr and it is assumed that the result is either a Mul
or an Add. Tests were added which fail in master because this is not true.

The recurse function was added to tidy up the code and make it clearer
if it is an identical recursion that is happening or if a flag is
changing.
Merge pull request #1303 from raoulb/log_base_one

Fix log(x, b) with base b == 1
Merge branch 'master' into issue-2867-lambdify-raises

Conflicts:
	sympy/core/tests/test_expr.py
	sympy/core/tests/test_relational.py
Staging of the new differential_geometry module.

This module is based on "Functional Differential Geometry" by Sussman and
Wisdom.

Import:
-------
It is not automatically imported by `from sympy import *`. To import it use
`import sympy.differential_geometry`.

Structure:
----------

The first patch brings the basic `Manifold` and `Patch` classes which are not
much more than containers for objects defined on the Manifold.

Each `Patch` can define a number of `CoordSystem` objects which contain all the
logic necessary for coordinate transformations.

`Point` instances can be defined using coordinates in a `CoordSystem`.

`ScalarField` objects can be defined. They take a point and return a scalar.

`VectorField` represents an operator on `ScalarField` (a directional
derivative).

Rudimentary docstrings are provided.

Predefined Manifolds:
---------------------

The R2 manifold is predefined in order to facilitate work on this manifold.
To import it use `from sympy.differential_geometry.Rn import R2, R2_r, R2_p`.
R2 is the manifold and R2_r and R2_p are the rectangular and polar
`CoordSystem` instances.

Other predefined manifolds will be supplied also.

Tests:
------

Test with complete coverage are provided. The examples from "Functional
Differential Geometry" are also provided as tests.

The only part that is not tested is unfinished functionality related to the
connections between coordinate systems.

The test_args.py test that check whether the args are instances of Basic are
XFAILed at the moment.
Mark coordinate-dependent attributes in differential_geometry as private.

An underscore was appended to all attributes that are coordinate-dependent.
powsimp: clean up initial deep handling; don't use expand_mul
powsimp: use expansion on new_base

This is a hard term to get to in the simplification process. Once the
power is rebuilt and multiplied by something, any terms that were
collected will be autoexpanded again. So the expansion is done here to
see if some terms were joined in the process. This is quantified with a
_terms function that counts how many terms an expression should give
when it is expanded out.

In simplify, the numerator and denominator processing are done unconditionally
now since the expansion is being handled powsimp and more than an Add
can benefit from this.
Merge pull request #1301 from smichr/3268-9

Issues 3268 and 3269
Merge pull request #911 from toolforger/issue-2867-lambdify-raises

Issue 2867 lambdify raises
3271: allow numbers from exponents to combine in simplify

Although factor_terms is used to change things like 2**(2+x) into
4*2**x, expand(power_exp=True) could be used, too. An added benefit
of using factor_terms is that a light factoring is obtained which leads
(IMHO) to aesthetically simpler expressions.
Merge pull request #1282 from asmeurer/middle

Revert "Work-around \middle."