yajnaval
(Yaj Bhattacharya)
December 12, 2015, 3:11pm
1
I am trying to get more significant digists (up to 8 or 10) for the following expression and for the value of b where it is minimum,
NMinimize[{(-((4*\alpha *b$^3$)/(2 b+\mu )^2 )+(64 b$^5$ (6 b + 4 b$^3$ - 16 b$^5$+
(3 Sqrt[1/b^2 ] b \pi )/Sqrt[1-b$^2$]-(6 ArcSin[b])/Sqrt[1-b^2 ]))/((96 b$^5$-96 b^7 ) \pi ))/(1+b$^2$),
0<=b<=0.99999999999},{b}, AccuracyGoal->20] /. {\alpha → 0.05 , \mu → 0.01}
The result is
{1.99975, {b → 0.0227689}}
How can I get some more significant digits?
yajnaval
(Yaj Bhattacharya)
December 12, 2015, 3:16pm
2
Tried formatting it for the forum, the actual input would be
NMinimize[{(-((4alpha b^3)/(2 b + mu)^2) + (64 b^5 (6 b + 4 b^3 -
16 b^5 + (3 Sqrt[1/b^2] b [Pi])/
Sqrt[1 - b^2] - (6 ArcSin[b])/Sqrt[1 - b^2]))/((96 b^5 -
96 b^7) [Pi]))/(1 + b^2), 0 <= b <= 0.99999999999}, {b},
AccuracyGoal → 20] /. {alpha → 0.05 , mu → 0.01}
yajnaval
(Yaj Bhattacharya)
December 12, 2015, 4:22pm
3
OK, WorkingPrecision works, but not AccuracyGoal.
What’s the difference i.e. why would AccuracyGoal refuse to produce more significant digits, is it because WorkingPrecision is some sort of brute force?
sghuisman
(Sander Huisman)
December 12, 2015, 5:05pm
4
Try to code it neatly, and first do the substitution to make it a lot easier. In addition, change the substitutions to exact fraction:
func=(-((4alpha b^3)/(2 b+mu)^2)+(64 b^5 (6 b+4 b^3-16 b^5+(3 Sqrt[1/b^2] b Pi)/Sqrt[1-b^2]-(6 ArcSin[b])/Sqrt[1-b^2]))/((96 b^5-96 b^7)(Pi)))/(1+b^2);
func=func/.{alpha->1/20,mu->1/100}//Simplify
NMinimize[{func,0<=b<1},{b},AccuracyGoal->40,WorkingPrecision->40]