The working equation when dealing with problems regarding compounded interest is
![A=P(1+(r)/(n))^(nt)](https://img.qammunity.org/2023/formulas/mathematics/high-school/39foo2gerf9tf1ffk32zwshrn339mz02kv.png)
where A is the future value, P is the principal value, r is the annual rate, and n is the number of compounding periods.
The problem compounds quarterly, hence, we have n = 4.
We derive the working equation to solve for t, as follows:
![\begin{gathered} (A)/(P)=(1+(r)/(n))^(nt) \\ \ln ((A)/(P))=\ln ((1+(r)/(n))^(nt)) \\ nt\ln ((1+(r)/(n)))=\ln ((A)/(P)) \\ t=(\ln ((A)/(P)))/(n\ln ((1+(r)/(n)))) \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/high-school/5z4nr1k5kpy5ajq0q7tap9nkhvqv0exupo.png)
Substitute the values of A, P, n, and r on the derived equation above and solve for t, we get
![\begin{gathered} t=(\ln ((5780)/(4000)))/(4(\ln (1+(0.04)/(4)))) \\ t=(\ln (1.445))/(4(\ln (1.01))) \\ t=(0.368)/(4(0.00995)) \\ t\approx9.25 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/high-school/cttc3ffkscgrjhc9exh3uorgq3zcs6f9gw.png)
Therefore, the $4000 investment grows to $5780 in 9.25 years.