# Finding simplifying substitutions for an integral involving limits and integrand

[The following is based on a William Lowell Putnam Mathematical Competition problem.]

Consider the definite integral:

$I = \int\limits_2^4 \frac{\sqrt{\log (9-x)}}{\sqrt{\log (9-x)}+\sqrt{\log (x+3)}} \, dx$

Mathematica's numerical integration yields the answer directly:

NIntegrate[Sqrt[Log[9 - x]]/(Sqrt[Log[9 - x]] + Sqrt[Log[x + 3]]), {x, 2, 4}]


(* 1. *)

However, the symbolic integration does not:

Integrate[Sqrt[Log[9 - x]]/(Sqrt[Log[9 - x]] + Sqrt[Log[x + 3]]), {x, 2, 4}]


Note, though, that with the proper substitution, the integral can be solved symbolically. As the integration variable $x$ goes from $2 \rightarrow 4$, then the term $9 - x$ goes $7 \rightarrow 5$ and the term $x + 3$ goes $5 \rightarrow 7$. This symmetry suggests the substitution $x = 6 - y$ and reversing the limits of integration. This substitution gives the integral:

$I = \int\limits_2^4 {\sqrt{\log (y+3)} \over \sqrt{\log (y+3)} + \sqrt{\log (9-y)}} dy$

and so:

$2I = \int\limits_2^4 {\sqrt{\log (x+3)} + \sqrt{\log (9-x)} \over \sqrt{\log (x + 3)} + \sqrt{\log (9 - x)}} dx = \int\limits_2^4 dx = 2$

and thus $I = 1$.

Mathematica would have to be quite "clever" in finding the symmetry of the integrand given the integral's limits and performing the substitutions.

## Question:

Is there any general approach (with FullSimplify, for instance) in which Mathematica could solve this integral symbolically?