0
|
5521 Views
|
4 Replies
|
3 Total Likes
View groups...
Share
GROUPS:

# Solving a Log equation with NSolve

Posted 11 years ago
 x1 =  Sqrt[2 \[Pi] n] (n/Exp[1])^n;x2 = (n/Exp[1])^n;x3 = n^n;x4 = 2;NSolve[(Log[n!] - Log[ x4])/Log[n!] <= 0.01, n]Hello,I would solve the equation on the top. But NSolve gives no output. I need the solution for x1,..,x3. x3 is simple and works.Thanks for your help!Niklas
4 Replies
Sort By:
Posted 11 years ago
 If you change the .01 to 10^-2, you get a message that the system cannot be solved with the methods available to NSolve.
Posted 11 years ago
 x =  {Sqrt[2 \[Pi] n] (n/Exp[1])^n, (n/Exp[1])^n, n^n};test = {4, 90, 10^10};lsg = Flatten[  Table[FindRoot[(Log[n!] - Log[ x[[i]]])/Log[n!] == 10^-2, {n,      test[[i]]}], {i, 3}]]Table[Abs[N[(Log[n!] - Log[ x[[i]]])/Log[n!] /. lsg[[i]]]], {i, 3}]Now I'm using FindRoot, this maybe works. But the third and last value is for different third elements of test differently. Because of the Precision?Regards,Niklas Casper
Posted 11 years ago
 The third value is the first two values times Sqrt[10.]. Is there an extra factor of ten in the formulas?
Posted 11 years ago
 That third eqn cannot have a positive root. Log[n!] (or LogGamma[n+1]) is always smaller than n*Log, so the lhs will be negative for n>0.