How to integrate $\int \frac{5^x dx}{5^x+3^x}$? I already know how to begin because I got the hint from an online calculator. 
The only thing is I can't derive the hint myself. 
The hint is to write 
$$5^x= \frac {\ln3}{\ln3-\ln5}(5^x+3^x)- \frac{1}{\ln3-\ln5}(\ln5 \cdot 5^x+ \ln3\cdot 3^x) $$
I don't have a clue on how to arrive at this hint. I know however how to continue after the hint.
Could some explain how one arrives at the hint?
 A: I'm not a big fan of that approach.  I would approach the problem as follows:
To begin, divide the top and bottom by $3^x$ to get
$$
\int \frac{1}{1 + (5/3)^x}\,(5/3)^x dx
$$
Now, it suffices to apply a $u$-subsitution with $u = (5/3)^x$.  The integral is rewritten as
$$
\frac 1{\ln(5/3)} \int  \frac{1}{1 + u}\,du = \frac 1{\ln5 - \ln 3} \int  \frac{1}{1 + u}\,du
$$

As for how one arrives at the hint, I assume the thought process is as follows:
We would like to find coefficients $\alpha, \beta$ such that
$$
5^x = \alpha\,(5^x + 3^x) + \beta\,(\ln 5 \cdot 5^x + \ln 3\cdot 3^x)
$$
once we have computed such coefficients, we can express the integral as
$$
\int \frac{\alpha\,(5^x + 3^x) + \beta\,(\ln 5 \cdot 5^x + \ln 3\cdot 3^x)}{5^x + 3^x} dx =\\
\alpha\,x + \beta \ln|5^x + 3^x| + C
$$
With that in mind: we can set up the equation for these coefficients as
$$
5^x = \alpha\,(5^x + 3^x) + \beta\,(\ln 5 \cdot 5^x + \ln 3\cdot 3^x) \implies\\
5^x = (\alpha + \beta \ln 5) 5^x + (\alpha + \beta \ln 3) 3^x
$$
Setting coefficients equal, we can now solve the system of equations
$$
\alpha + \beta \ln 5 = 1\\
\alpha + \beta \ln 3 = 0
$$
to obtain the coefficients.
I'm sure there's a nice analogy to be made between this approach and the use of "partial fractions" for integrating rational expressions.
