0
$\begingroup$

solve for the smallest N value for this inequality, I tried several online calculators and they are not working.

enter image description here

$\endgroup$
9
  • 2
    $\begingroup$ Is this a question about Mathematica or about Mathematics? $\endgroup$ – Roman Mar 19 at 18:11
  • 1
    $\begingroup$ No, this is not a "get someone to do your homework" site... $\endgroup$ – ciao Mar 19 at 18:13
  • 1
    $\begingroup$ NestWhile[# + 1 &, 0, NIntegrate[(x^2 + 4)^4/2^x, {x, #, # + 1}] > 1 &] . Notice, I use NIntegrate , so it may occur some precision problem. $\endgroup$ – wuyudi Mar 19 at 18:15
  • 2
    $\begingroup$ Reduce[Integrate[(x^2 + 4)^4/2^x, {x, n, n + 1}] < 1/10, n] Or if you want to search for it, you could start your search at this value: Reduce[(x^2 + 4)^4/2^x < 1/10 /. x -> n + 1, n] $\endgroup$ – Michael E2 Mar 19 at 19:31
  • 1
    $\begingroup$ @MichaelE2: That does not work for Integrate[(x^2 + 4)^Pi/2^x, {x, n, n + 1}]. $\endgroup$ – user64494 Mar 19 at 19:38
2
$\begingroup$

Let

f[n_] := NIntegrate[(x^2 + 4)^4/2^x, {x, n, n + 1}]

though the above integral can be expressed in a closed form. First, the result of

NMinimize[{f[n], n <= 10}, n, Method -> "DifferentialEvolution"]

{244.597, {n -> -0.120219}}

kicks out n<=10. Second, we find

NMinimize[{n, f[n] <= 0.1 && n >= 10}, n, Method -> "DifferentialEvolution"]

{47.5369, {n -> 47.5369}}

The command

Plot[{Evaluate[f[n]], 0.1}, {n, 40, 60}]

enter image description here

confirms it. Just to compare

NestWhile[# + 1 &, 0, NIntegrate[(x^2 + 4)^4/2^x, {x, #, # + 1}] > 0.1 &]

48

$\endgroup$
1
  • 1
    $\begingroup$ NestWhile[# + 0.01 &, 1, NIntegrate[(x^2 + 4)^4/2^x, {x, #, # + 1}] > 0.1 &] // AbsoluteTiming results in {34.8565, 47.54}. $\endgroup$ – user64494 Mar 19 at 19:33
1
$\begingroup$

We set t=1/N and use NDSolve.

f[x_] := (x^2 +4)^4/2^x; 
NDSolve[{F'[t] == (f[1/t + 1] - f[1/t]) (-1/t^2), 
  F[1] == Integrate[f[x], {x, 1, 2}], 
  WhenEvent[F[t] <= 1/10, Print[Ceiling[1/t]]]}, F, {t, 1/1000, 1}]

48

i[n_] = Integrate[f[x], {x, n, n + 1}];
{i[47], i[48], i[49]} // N

{0.132621, 0.0783269, 0.0461038}

$\endgroup$
1
  • $\begingroup$ g[x_] := (x^2 + 4)^\[Pi]/ 2^x; NDSolve[{G'[t] == (g[1/t + 1] - g[1/t]) (-1/t^2), G[1] == NIntegrate[g[x], {x, 1, 2}], WhenEvent[G[t] <= 1/10, Print[Ceiling[1/t]]]}, G, {t, 1/100, 1}] for π . $\endgroup$ – cvgmt Mar 20 at 0:39

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