Problem was in the form of (not the actual problem since I'm not looking for an exact answer) the series: $3(-1)^n / n!$, how many terms do we need to add to get an error of $10^{-3}$.
While I solved the problem already, it seemed unconventional and I figured out it would be better to find the amount of terms needed.
Generally when solving these problems, we would use a equation to solve for $n$, but I was unsure what to do since there was a factorial.
How would one solve this type of problem?
$\endgroup$ 02 Answers
$\begingroup$Same thing as before. The error is less than the last term, so you want$3/n! < .001$or$n! > 3000 $.
The factorials starting at 4 are 24, 120, 720, 5040, so n=7 has a term of 3/5040 < .001 so 6 terms will do.
What makes this harder is there is no simple inverse function for factorial.
$\endgroup$ 1 $\begingroup$Something about $n$ should be mentioned, since it is not, i will start with $n=0$. To have an idea about the possibilities to estimate $$ S = \sum_{n\ge 0}\frac 1{n!}(-3)^n=\exp(-3) \approx 0.049787068367863\dots $$i will write only:$$ \begin{aligned} S &= \frac 1{0!} - \frac 3{1!} + \frac {3^2}{2!} - \frac {3^3}{3!} + \frac {3^4}{4!} - \frac {3^5}{5!} + \underbrace{ \left( \frac {3^6}{6!} - \frac {3^7}{7!} \right)}_{\ge 0} + \underbrace{ \left( \frac {3^8}{8!} - \frac {3^9}{9!} \right)}_{\ge 0} + \dots \\ &\ge \frac 1{0!} - \frac 3{1!} + \frac {3^2}{2!} - \frac {3^3}{3!} + \frac {3^4}{4!} - \frac {3^5}{5!} \ , \\[3mm] S &= \frac 1{0!} - \frac 3{1!} + \frac {3^2}{2!} - \frac {3^3}{3!} + \frac {3^4}{4!} - \frac {3^5}{5!} + \frac {3^6}{6!} - \underbrace{ \left( \frac {3^7}{7!} - \frac {3^8}{8!} \right)}_{\ge 0} - \underbrace{ \left( \frac {3^9}{9!} - \frac {3^{10}}{10!} \right)}_{\ge 0} + \dots \\ &\le \frac 1{0!} - \frac 3{1!} + \frac {3^2}{2!} - \frac {3^3}{3!} + \frac {3^4}{4!} - \frac {3^5}{5!} + \frac {3^6}{6!} \ . \end{aligned} $$We have the above lower and upper estimates, and the difference is the last term we stopped at.
The same argument works in general for alternating series built using monotone sequences $\searrow 0$ (at least after some point, as is the case in our case).
So for the given question, we stop at the point $N$ where $3^N/N!$ becomes less than the mentioned error. In our case we have for instance:$$ \frac {3^{13}}{13!} \approx 0.000256033029470529\dots \ . $$
$\endgroup$