The working equation when dealing with problems regarding compounded interest is
[tex]A=P(1+\frac{r}{n})^{nt}[/tex]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:
[tex]\begin{gathered} \frac{A}{P}=(1+\frac{r}{n})^{nt} \\ \ln (\frac{A}{P})=\ln ((1+\frac{r}{n})^{nt}) \\ nt\ln ((1+\frac{r}{n}))=\ln (\frac{A}{P}) \\ t=\frac{\ln (\frac{A}{P})}{n\ln ((1+\frac{r}{n}))} \end{gathered}[/tex]Substitute the values of A, P, n, and r on the derived equation above and solve for t, we get
[tex]\begin{gathered} t=\frac{\ln (\frac{5780}{4000})}{4(\ln (1+\frac{0.04}{4}))} \\ t=\frac{\ln (1.445)}{4(\ln (1.01))} \\ t=\frac{0.368}{4(0.00995)} \\ t\approx9.25 \end{gathered}[/tex]Therefore, the $4000 investment grows to $5780 in 9.25 years.