3
$\begingroup$

Good day.

I am new to Mathematica and I am looking for advice. Is it possible to solve

$$\sum_{k=0}^{n} \frac{p^k}{k!}>0$$

for $n$ where $p$ is a parameter? When I do

Solve[Sum[p^k/k!, {k, 0, n}] > 0, {n}, Integers]

I get the following:

Solve::nsmet: This system cannot be solved with the methods available to Solve

Is there anything I can do about it or is it impossible to solve?

What I am trying to get is an expression for $n$ which contains $p$ as a parameter or a procedure which finds such an $n$ with the number of steps that can be determined beforehand. Like a for loop, not while. It seems to me that Mathematica has problems with sums.

$\endgroup$
  • $\begingroup$ If $p$ is positive, then your sum is always positive. Negative $p$ is a different can of worms… $\endgroup$ – J. M.'s technical difficulties Jul 28 '15 at 10:44
  • 1
    $\begingroup$ The incomplete gamma function doesn't have a closed-form inverse in this case; you'll have to resort to numerics for particular values of p. $\endgroup$ – J. M.'s technical difficulties Jul 28 '15 at 10:49
  • 1
    $\begingroup$ There's always brute-force: Table[If[GammaRegularized[n + 1, p] < 0, n, ##&[]], {n, 100}]. $\endgroup$ – J. M.'s technical difficulties Jul 28 '15 at 11:00
  • $\begingroup$ FindInstance[Sum[p^k/k!, {k, 0, n}] > 0, {n, p}, Integers, 5] $\endgroup$ – Bob Hanlon Jul 28 '15 at 15:08
  • 1
    $\begingroup$ @ValerySaharov maybe you could clarify exactly what you want then, by editing your original question (use the "edit" link right under your question). $\endgroup$ – MarcoB Jul 28 '15 at 15:25
1
$\begingroup$

The title of your question states that you will be satisfied with an instance of {p, n} that satisfies Sum[p^k/k!, {k, 0, n}] > 0. Here is a function to find any number of such instances:

instances[m_Integer?Positive] := 
  Block[{p, n, k}, 
    FindInstance[Sum[p^k/k!, {k, 0, n}] > 0 && p ∈ Reals && n ∈ Integers, {n, p}, m]]

And here are two

instances[2]
{{n -> 168, p -> 11/2}, {n -> 485, p -> 493/10}}

If this is not answer to your question, we need to know why.

| improve this answer | |
$\endgroup$
  • $\begingroup$ @ValerySaharov. As a native speaker of English, I find your interpretation of "[f]ind an instance" strange beyond all understanding. $\endgroup$ – m_goldberg Jul 30 '15 at 16:48
  • $\begingroup$ @ValerySaharov And as you can see, Mathematica's interpretation of FindInstance seems to reproduce native speakers' understandings. I suggest, you edit the title accordingly (such as "express n with p" or something like that). $\endgroup$ – LLlAMnYP Jul 31 '15 at 0:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.