#### Answer

The first investment would earn $\$1,146,578$ more than the second investment.

#### Work Step by Step

This is the formula we use when we make calculations with compound interest:
$A = P~(1+\frac{r}{n})^{nt}$
$A$ is the final amount in the account
$P$ is the principal (the amount of money invested)
$r$ is the interest rate
$n$ is the number of times per year the interest is compounded
$t$ is the number of years
We can find the total amount in the account $A_1$ after 40 years when we invest at a rate of 10% for 40 years.
$A = P~(1+\frac{r}{n})^{nt}$
$A_1 = (\$30,000)~(1+\frac{0.10}{1})^{(1)(40)}$
$A_1 = \$1,357,777.67$
After 40 years, there will be $\$1,357,777.67$ in the account.
We can find the total amount in the account $A_2$ after 40 years when we invest at a rate of 5% for 40 years.
$A = P~(1+\frac{r}{n})^{nt}$
$A_2 = (\$30,000)~(1+\frac{0.05}{1})^{(1)(40)}$
$A_2 = \$211,199.66$
After 40 years, there will be $\$211,199.66$ in the account.
We can find the difference between the first investment and the second investment.
$A_1-A_2 = \$1,357,777.67-\$211,199.66$
$A_1-A_2 = \$1,146,578$
The first investment would earn $\$1,146,578$ more than the second investment.