Fewest number of terms needed to approximate u(x,t) with an error at most $10^{-6}$

25 Views Asked by At

Given $$u(x,t) = \sum_{n=1}^\infty \frac{\sin(n\pi x) \exp(-n^2\pi^2t)}{2^n}$$ where$\:0 \le x \le 1, \: t \ge 0$, I've previously shown that an upper bound on the error term is $$\sum_{n=c}^\infty \frac{1}{2^n}$$ where $c = c^{th}$ partial sum. Now, I would like to find $c$ such that my error term is $\le 10^{-6}$. If I use the upper bound, I can show that I would need $21$ terms so that this constraint is satisfied, but I am unsure if this is valid since I am using an upper bound. Additionally, if I hold $x$ and $t$ constant, I can empirically see that the series converges quite fast, so $21$ terms seems too high. Is what I was doing the proper approach and if so, how come it is valid since it is the upper bound on the error?