-2

Is there a way how to calculate limits in js without using extenal libraries?

Lets say we have limit

lim n-> infinity = n^{n/2} / n!

could we solve it using plain js?

J.dd
  • 145
  • 15
  • I believe it could be. Did you see [factorial](http://stackoverflow.com/questions/31126315/) or [factorial on mozilla](https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Functions) or [javascript exponents](http://stackoverflow.com/questions/5907063/). What have you tried to solve it and where is your code? – surfmuggle Nov 27 '16 at 13:17
  • Why would you do such a thing programmatically? – duffymo Nov 27 '16 at 16:18

1 Answers1

0

You can compute the sequence values for increasingly large n, and make some arguments if these values stop to change. Some CAS can manipulate limits symbolically, but not plain javascript.

In the current case you would be faster looking up Stirling's formula of

n!~(2*pi*n)^0.5*(n/e)^n

to find that your limit is zero.

Lutz Lehmann
  • 25,219
  • 2
  • 22
  • 51